about summary refs log tree commit diff
path: root/tests/ui/drop/recursion-check-on-erroneous-impl.rs
blob: 83dd18a406aacf73646e3c66609b6c5b6edcba0a (plain)
1
2
3
4
5
6
7
8
9
10
11
// 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() {}