File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 12
12
//! const SOME_PROPERTY: bool = true;
13
13
//! }
14
14
//!
15
- //! # trait QueryId { const SOME_PROPERTY: core::primitive::bool; }
15
+ //! # trait QueryId { const SOME_PROPERTY: :: core::primitive::bool; }
16
16
//! ```
17
17
//!
18
18
//! Note that the `SOME_PROPERTY` associated constant would not compile, as its
25
25
//! pub struct bool;
26
26
//!
27
27
//! impl QueryId for bool {
28
- //! const SOME_PROPERTY: core::primitive::bool = true;
28
+ //! const SOME_PROPERTY: :: core::primitive::bool = true;
29
29
//! }
30
30
//!
31
- //! # trait QueryId { const SOME_PROPERTY: core::primitive::bool; }
31
+ //! # trait QueryId { const SOME_PROPERTY: :: core::primitive::bool; }
32
32
//! ```
33
+ //!
34
+ //! We also used `::core` instead of `core`, because `core` can be
35
+ //! shadowed, too. Paths, starting with `::`, are searched in
36
+ //! [extern prelude].
37
+ //!
38
+ //! [extern prelude]: https://doc.rust-lang.org/nightly/reference/names/preludes.html#extern-prelude
33
39
34
40
#[ stable( feature = "core_primitive" , since = "1.43.0" ) ]
35
41
pub use bool;
You can’t perform that action at this time.
0 commit comments