rust/tests/ui/drop/recursion-check-on-erroneous-impl.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
317 B
Rust
Raw Normal View History

// can't use build-fail, because this also fails check-fail, but
// the ICE from #120787 only reproduces on build-fail.
//@ compile-flags: --emit=mir
struct PrintOnDrop<'a>(&'a str);
impl Drop for PrintOnDrop<'_> {
fn drop() {} //~ ERROR method `drop` has a `&mut self` declaration in the trait
}
fn main() {}