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