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
Names introduced via `use` declarations in an [outer scope] are shadowed by
114
-
candidates in the same namespace with the same name from an inner scope except
115
-
where otherwise restricted by [name resolution ambiguities].
113
+
Names introduced via `use` declarations in an [outer scope] are shadowed by candidates in the same namespace with the same name from an inner scope except where otherwise restricted by [name resolution ambiguities].
116
114
117
-
```rust
118
-
pubmodfoo {
119
-
pubmodbaz {
120
-
pubstructName;
115
+
```rust,no_run
116
+
pub mod m1 {
117
+
pub mod inner {
118
+
pub const C: u8 = 1;
121
119
}
122
120
}
123
121
124
-
pubmodbar {
125
-
pubmodbaz {
126
-
pubstructName(pub ());
122
+
pub mod m2 {
123
+
pub mod inner {
124
+
pub const C: u8 = 2;
127
125
}
128
126
}
129
127
130
-
usefoo::baz;
128
+
// This introduces the name `inner` in the outer scope.
0 commit comments