mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
16 lines
265 B
Rust
16 lines
265 B
Rust
//@ run-rustfix
|
|
|
|
#![allow(unused)]
|
|
|
|
struct Foo<T>(T);
|
|
|
|
impl<T> Foo<T> {
|
|
fn test() -> i32 { 1 }
|
|
}
|
|
|
|
fn main() {
|
|
let x = Box::new(Foo(1i32));
|
|
Foo::<i32>::test();
|
|
//~^ ERROR no method named `test` found for struct `Box<Foo<i32>>` in the current scope
|
|
}
|