File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -120,17 +120,17 @@ even though they should be visible by ordinary scoping rules. An example:
120
120
fn do_something <T : Default >(val : T ) { // <- New rib in both types and values (1)
121
121
// `val` is accessible, as is the helper function
122
122
// `T` is accessible
123
- let helper = || { // New rib on `helper` (2) and another on the block (3 )
123
+ let helper = || { // New rib on the block (2 )
124
124
// `val` is accessible here
125
- }; // End of (3)
125
+ }; // End of (2), new rib on `helper` ( 3)
126
126
// `val` is accessible, `helper` variable shadows `helper` function
127
127
fn helper () { // <- New rib in both types and values (4)
128
128
// `val` is not accessible here, (4) is not transparent for locals
129
129
// `T` is not accessible here
130
130
} // End of (4)
131
131
let val = T :: default (); // New rib (5)
132
132
// `val` is the variable, not the parameter here
133
- } // End of (5), (2 ) and (1)
133
+ } // End of (5), (3 ) and (1)
134
134
```
135
135
136
136
Because the rules for different namespaces are a bit different, each namespace
You can’t perform that action at this time.
0 commit comments