From 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:03:36 +0200 Subject: Adding upstream version 1.65.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/closures/issue-6801.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/ui/closures/issue-6801.rs') diff --git a/src/test/ui/closures/issue-6801.rs b/src/test/ui/closures/issue-6801.rs index 694d86feb..cecb08f00 100644 --- a/src/test/ui/closures/issue-6801.rs +++ b/src/test/ui/closures/issue-6801.rs @@ -2,7 +2,7 @@ // transferring ownership of the box before invoking the stack // closure results in a crash. -#![feature(box_syntax)] + fn twice(x: Box) -> usize { *x * 2 @@ -13,7 +13,7 @@ fn invoke(f: F) where F: FnOnce() -> usize { } fn main() { - let x : Box = box 9; + let x : Box = Box::new(9); let sq = || { *x * *x }; twice(x); //~ ERROR: cannot move out of -- cgit v1.2.3