@@ -59,21 +59,14 @@ prelude lookups within that module.
59
59
> Beginning in the 2018 edition, [ use declarations] can reference crates in
60
60
> the extern prelude, so it is considered unidiomatic to use ` extern crate ` .
61
61
62
- > ** Note** : Crates not explicitly named with the ` --extern ` flag with ` rustc `
63
- > are not included in the extern prelude. As a result, additional crates
64
- > that ship with ` rustc ` , such as [ ` proc_macro ` ] , [ ` alloc ` ] , and [ ` test ` ] ,
65
- > currently aren't available in the extern prelude and must be brought into
66
- > scope with an ` extern crate ` declaration, even in the 2018 edition. ` use `
67
- > paths must reference the ` extern crate ` item (such as using [ ` crate:: ` ] or
68
- > [ ` self:: ` ] path prefixes).
62
+ > ** Note** : Additional crates that ship with ` rustc ` , such as [ ` proc_macro ` ] ,
63
+ > [ ` alloc ` ] , and [ ` test ` ] , are not automatically included with the ` --extern `
64
+ > flag when using Cargo. They must be brought into scope with an `extern
65
+ > crate` declaration, even in the 2018 edition.
69
66
>
70
67
> ``` rust
71
68
> extern crate proc_macro;
72
- > // Cannot reference `proc_macro` directly because it is not in the extern prelude.
73
- > // use proc_macro::TokenStream;
74
- > // Instead, you must reference the item in scope from the `extern crate`
75
- > // declaration.
76
- > use self :: proc_macro :: TokenStream ;
69
+ > use proc_macro :: TokenStream ;
77
70
> ```
78
71
79
72
<! --
0 commit comments