13 lines
166 B
Plaintext
13 lines
166 B
Plaintext
unit baddrop;
|
|
|
|
struct Box {
|
|
value: i32,
|
|
fn drop(self: &mut Self) { self.value = 0; }
|
|
}
|
|
|
|
fn bad() -> void {
|
|
var b: Box = Box{ value: 1 };
|
|
b.drop();
|
|
}
|
|
|