diff options
Diffstat (limited to 'tests/ui/lexical-scopes.rs')
-rw-r--r-- | tests/ui/lexical-scopes.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/lexical-scopes.rs b/tests/ui/lexical-scopes.rs new file mode 100644 index 000000000..46cfdf1ef --- /dev/null +++ b/tests/ui/lexical-scopes.rs @@ -0,0 +1,13 @@ +struct T { i: i32 } +fn f<T>() { + let t = T { i: 0 }; //~ ERROR expected struct, variant or union type, found type parameter `T` +} + +mod Foo { + pub fn f() {} +} +fn g<Foo>() { + Foo::f(); //~ ERROR no function or associated item named `f` +} + +fn main() {} |