rust/src/test/ui/lexical-scopes.rs
2018-12-25 21:08:33 -07:00

14 lines
259 B
Rust

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() {}