File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/doc/rustc-dev-guide/src Expand file tree Collapse file tree 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:
120120fn do_something <T : Default >(val : T ) { // <- New rib in both types and values (1)
121121 // `val` is accessible, as is the helper function
122122 // `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 )
124124 // `val` is accessible here
125- }; // End of (3)
125+ }; // End of (2), new rib on `helper` ( 3)
126126 // `val` is accessible, `helper` variable shadows `helper` function
127127 fn helper () { // <- New rib in both types and values (4)
128128 // `val` is not accessible here, (4) is not transparent for locals
129129 // `T` is not accessible here
130130 } // End of (4)
131131 let val = T :: default (); // New rib (5)
132132 // `val` is the variable, not the parameter here
133- } // End of (5), (2 ) and (1)
133+ } // End of (5), (3 ) and (1)
134134```
135135
136136Because the rules for different namespaces are a bit different, each namespace
You can’t perform that action at this time.
0 commit comments