diff --git a/src/connectivity/network/netstack3/docs/PUB_CRATE.md b/src/connectivity/network/netstack3/docs/PUB_CRATE.md index e6e752ea9b4b4ebc79ea47aa8b9d6f647e9aac2f..ab978a68769b34c12ca83e676f2c70413656b1fd 100644 --- a/src/connectivity/network/netstack3/docs/PUB_CRATE.md +++ b/src/connectivity/network/netstack3/docs/PUB_CRATE.md @@ -17,12 +17,12 @@ situation in Rust is through "re-exports" - in the root, we write something like `crate::foo::bar::do_thing`. This works, but has two major downsides. First, there's no way, when looking at -an item declaration, whether it's marked `pub` because it's intended to be used -by other modules in the crate, or because it's going to be re-exported publicly. -Second, there's no way to enforce that we don't accidentally use some item which -is *not* re-exported in the API of one that is. So long as both are `pub`, the -compiler can't tell that one is re-exported and the other isn't. E.g., consider -this code: +an item declaration, to know whether it's marked `pub` because it's intended to +be used by other modules in the crate, or because it's going to be re-exported +publicly. Second, there's no way to enforce that we don't accidentally use some +item which is *not* re-exported in the API of one that is. So long as both are +`pub`, the compiler can't tell that one is re-exported and the other isn't. +E.g., consider this code: ```rust pub struct Foo; diff --git a/src/connectivity/network/netstack3/docs/README.md b/src/connectivity/network/netstack3/docs/README.md index 19844da2a8ff6d83f923fab8f303b1f75d1974d2..06112ed18a87cb112aa194c69ea52b7df650c02f 100644 --- a/src/connectivity/network/netstack3/docs/README.md +++ b/src/connectivity/network/netstack3/docs/README.md @@ -11,4 +11,5 @@ This directory contains documentation of various aspects of the netstack. Briefl - [`IP_TYPES.md`](./IP_TYPES.md) describes our use of types and traits to represent IP versions and addresses - [`PARSING_SERIALIZATION.md`](./PARSING_SERIALIZATION.md) describes how we parse and serialize packets, and how we manage packet buffers -- [`TYPES.md`](./TYPES.md) motivates our enthusiastic use of static typing +- [`PUB_CRATE.md`](./PUB_CRATE.md) describes how we use visibility modifiers. +- [`STATIC_TYPING.md`](./STATIC_TYPING.md) motivates our enthusiastic use of static typing