mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
12 lines
316 B
Rust
12 lines
316 B
Rust
// 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() {}
|