You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just a first pass to specifying how each thing introduces
a name, and where it is introduced. This is missing `use` and `Self`.
(And a few things I don't feel like need elaboration, like loop labels,
but those can be added if desired.)
Copy file name to clipboardExpand all lines: src/items/extern-crates.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,9 @@
11
11
> `as` ( [IDENTIFIER] | `_` )
12
12
13
13
An _`extern crate` declaration_ specifies a dependency on an external crate.
14
-
The external crate is then bound into the declaring scope as the [identifier]
15
-
provided in the `extern crate` declaration. Additionally, if the `extern
16
-
crate` appears in the crate root, then the crate name is also added to the
17
-
[extern prelude], making it automatically in scope in all modules. The `as`
18
-
clause can be used to bind the imported crate to a different name.
14
+
The external crate is then bound into the declaring scope as the given [identifier] in the [type namespace].
15
+
Additionally, if the `extern crate` appears in the crate root, then the crate name is also added to the [extern prelude], making it automatically in scope in all modules.
16
+
The `as` clause can be used to bind the imported crate to a different name.
19
17
20
18
The external crate is resolved to a specific `soname` at compile time, and a
21
19
runtime linkage requirement to that `soname` is passed to the linker for
@@ -78,6 +76,7 @@ crate to access only its macros.
The trait declaration defines the trait in the [type namespace] of the module or block where it is located.
21
+
Associated items are defined as members of the trait within their respective namespaces: type namespace for associated types, and value namespace for constants and functions.
22
+
20
23
All traits define an implicit type parameter `Self` that refers to "the type
21
24
that is implementing this interface". Traits may also contain additional type
22
25
parameters. These type parameters, including `Self`, may be constrained by
0 commit comments