mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
13 lines
259 B
Rust
13 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() {}
|