| 1 |
#[lang = "sized"] |
| 2 |
pub trait Sized {} |
| 3 |
|
| 4 |
#[lang = "deref"] |
| 5 |
trait Deref { |
| 6 |
type Target; |
| 7 |
fn deref(&self) -> &Self::Target; |
| 8 |
} |
| 9 |
|
| 10 |
fn foo<T: Deref<Target = i32>>(t: &T) -> i32 { |
| 11 |
t.max(2) |
| 12 |
// { dg-error "no method named .max. found in the current scope" "" { target *-*-* } .-1 } |
| 13 |
} |