summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-10802.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-10802.rs')
-rw-r--r--src/test/ui/issues/issue-10802.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/ui/issues/issue-10802.rs b/src/test/ui/issues/issue-10802.rs
index f1d6b37a6..99e1a92df 100644
--- a/src/test/ui/issues/issue-10802.rs
+++ b/src/test/ui/issues/issue-10802.rs
@@ -1,6 +1,5 @@
// run-pass
#![allow(dead_code)]
-#![feature(box_syntax)]
struct DroppableStruct;
enum DroppableEnum {
@@ -33,14 +32,14 @@ impl Whatever {
fn main() {
{
- let f: Box<_> = box DroppableStruct;
- let _a = Whatever::new(box f as Box<dyn MyTrait>);
+ let f: Box<_> = Box::new(DroppableStruct);
+ let _a = Whatever::new(Box::new(f) as Box<dyn MyTrait>);
}
assert!(unsafe { DROPPED });
unsafe { DROPPED = false; }
{
- let f: Box<_> = box DroppableEnum::DroppableVariant1;
- let _a = Whatever::new(box f as Box<dyn MyTrait>);
+ let f: Box<_> = Box::new(DroppableEnum::DroppableVariant1);
+ let _a = Whatever::new(Box::new(f) as Box<dyn MyTrait>);
}
assert!(unsafe { DROPPED });
}