aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2139.rs
blob: 65f82f39f40aff096796194c48c89f2ca1ffa10d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[lang = "sized"]
pub trait Sized {}

pub trait Foo {
    fn foo();
}

impl Foo for u16 {
    fn foo() {
        <u16 as Foo>::foo()
    }
}

fn main() {
    let a: u16 = 123;
    a.foo();
    // { dg-error "no method named .foo. found in the current scope" "" { target *-*-* } .-1 }
}