diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/issues/issue-2734.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/test/ui/issues/issue-2734.rs b/src/test/ui/issues/issue-2734.rs index d449f6449..df4f394dc 100644 --- a/src/test/ui/issues/issue-2734.rs +++ b/src/test/ui/issues/issue-2734.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() { - let _ = perform_hax(box 42); + let _ = perform_hax(Box::new(42)); } |