aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/issue-2190-1.rs
blob: 927f90d6c9b005223667a1f49a0e738b04209435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#[lang = "sized"]
pub trait Sized {}

#[lang = "deref"]
trait Deref {
    type Target;
    fn deref(&self) -> &Self::Target;
}

fn foo<T: Deref<Target = i32>>(t: &T) -> i32 {
    t.max(2)
    // { dg-error "no method named .max. found in the current scope" "" { target *-*-* } .-1 }
}