blob: 75f20f76e660d618c1bd10874deffab0ae044e44 [file] [log] [blame]
// check-fail
#![feature(track_caller)]
trait Trait {
fn unwrap(&self);
}
impl Trait for u64 {
#[track_caller] //~ ERROR: `#[track_caller]` may not be used on trait methods
fn unwrap(&self) {}
}
struct S;
impl S {
#[track_caller] // ok
fn foo() {}
}
fn main() {}