rust/src/test/ui/issues/issue-56806.rs
Michael Hewson 2433526809 use delay_span_bug instead of bug! when doing layout sanity check
It's possible that `is_object_safe` is called on a trait that is ill-formed, and we shouldn't ICE unless there are no errors being raised. Using `delay_span_bug` solves this.

fixes #56806
2019-01-04 17:43:18 -05:00

8 lines
173 B
Rust

pub trait Trait {
fn dyn_instead_of_self(self: Box<dyn Trait>);
//~^ ERROR invalid method receiver type: std::boxed::Box<(dyn Trait + 'static)>
}
pub fn main() {
}