-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-codegenArea: Code generationArea: Code generationA-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)
Description
What this ought to do in the long term is under discussion in #3181, but I'm pretty sure some bug broke the current behaviour.
Test case:
struct Foo;
impl Drop for Foo {
fn drop(&self) {
error!("this oughta happen first");
}
}
fn foo(foo: Foo) {
// { use std::util; util::ignore(foo); } // this works as expected
let _ = foo; // this doesn't
// { let _ = foo; } // behaves the same as without the braces
error!("this oughta happen second");
}
fn main() {
foo(Foo);
}Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-destructorsArea: Destructors (`Drop`, …)Area: Destructors (`Drop`, …)