Skip to content

Commit 36ebfeb

Browse files
committed
accommodate box protocol in run-pass-valgrind.
1 parent 30db8cb commit 36ebfeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/run-pass-valgrind/cleanup-auto-borrow-obj.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ impl Trait for Foo {}
3030

3131
pub fn main() {
3232
{
33-
let _x: &Trait = &*(box Foo as Box<Trait>);
33+
let b: Box<_> = box Foo;
34+
let _x: &Trait = &*(b as Box<Trait>);
3435
}
3536
unsafe {
3637
assert!(DROP_RAN);

0 commit comments

Comments
 (0)