Description
Version
$ rustc -V
rustc 1.11.0-dev (42b7c32ac 2016-07-02)
STR
#![feature(slice_patterns, rustc_attrs)]
struct NoisyDrop;
impl Drop for NoisyDrop {
fn drop(&mut self) { println!("splat!"); }
}
#[rustc_mir]
fn main() {
let [x] = [NoisyDrop];
}
Expected Result
NoisyDrop
gets dropped once
Actual Result
NoisyDrop
is dropped twice
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlCategory: This is a bug.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Medium priorityRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the language team, which will review and decide on the PR/issue.