rust/tests/ui/lexical-scopes.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
259 B
Rust
Raw Normal View History

2016-03-08 17:33:48 -06:00
struct T { i: i32 }
fn f<T>() {
let t = T { i: 0 }; //~ ERROR expected struct, variant or union type, found type parameter `T`
2016-03-08 17:33:48 -06:00
}
mod Foo {
pub fn f() {}
}
fn g<Foo>() {
Foo::f(); //~ ERROR no function or associated item named `f`
2016-03-08 17:33:48 -06:00
}
fn main() {}