]>
Commit | Line | Data |
---|---|---|
7453a54e SL |
1 | // Tests that items in subscopes can shadow type parameters and local variables (see issue #23880). |
2 | ||
3 | #![allow(unused)] | |
4 | struct Foo<X> { x: Box<X> } | |
5 | impl<Bar> Foo<Bar> { | |
6 | fn foo(&self) { | |
7 | type Bar = i32; | |
8 | let _: Bar = 42; | |
9 | } | |
10 | } | |
11 | ||
223e47cc | 12 | fn main() { |
7453a54e | 13 | let f = 1; |
223e47cc | 14 | { |
7453a54e SL |
15 | fn f() {} |
16 | f(); | |
223e47cc LB |
17 | } |
18 | } |