summaryrefslogtreecommitdiffstats
path: root/src/test/ui/issues/issue-2735.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/issues/issue-2735.rs')
-rw-r--r--src/test/ui/issues/issue-2735.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/ui/issues/issue-2735.rs b/src/test/ui/issues/issue-2735.rs
index 794c7d4ed..20d3949a9 100644
--- a/src/test/ui/issues/issue-2735.rs
+++ b/src/test/ui/issues/issue-2735.rs
@@ -4,21 +4,19 @@
// pretty-expanded FIXME #23616
-#![feature(box_syntax)]
-
trait hax {
fn dummy(&self) { }
}
impl<A> hax for A { }
fn perform_hax<T: 'static>(x: Box<T>) -> Box<dyn hax+'static> {
- box x as Box<dyn hax+'static>
+ Box::new(x) as Box<dyn hax+'static>
}
fn deadcode() {
- perform_hax(box "deadcode".to_string());
+ perform_hax(Box::new("deadcode".to_string()));
}
pub fn main() {
- perform_hax(box 42);
+ perform_hax(Box::new(42));
}