Closed
Description
The following program doesn't print "drop". Looks unsound to me.
struct S;
impl Drop for S {
fn drop(&self) {
println("drop");
}
}
fn f(ref _s: S) {}
fn main() {
let s = S;
f(s);
}
In #5239, @nikomatsakis suggested that ref
shouldn't be allowed in argument patterns at all, but then that bug got closed because the ICE/llvm asserts over there stopped occuring.