blob: 04904958a6cae5a306bf98c15b5e8056ed85b656 [file] [log] [blame]
Vadim Petrochenkovca9faa52019-07-26 21:54:251// run-pass
Jeffrey Seyfriedfaf08522016-01-22 09:55:292// Tests that items in subscopes can shadow type parameters and local variables (see issue #23880).
3
4#![allow(unused)]
5struct Foo<X> { x: Box<X> }
6impl<Bar> Foo<Bar> {
7 fn foo(&self) {
8 type Bar = i32;
9 let _: Bar = 42;
10 }
11}
12
13fn main() {
14 let f = 1;
15 {
16 fn f() {}
17 f();
18 }
19}