From 94a0819fe3a0d679c3042a77bfe6a2afc505daea Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:28 +0200 Subject: Adding upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/dst/dst-rvalue.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/test/ui/dst/dst-rvalue.rs') diff --git a/src/test/ui/dst/dst-rvalue.rs b/src/test/ui/dst/dst-rvalue.rs index b52a95a70..fbb32cac1 100644 --- a/src/test/ui/dst/dst-rvalue.rs +++ b/src/test/ui/dst/dst-rvalue.rs @@ -1,12 +1,10 @@ // Check that dynamically sized rvalues are forbidden -#![feature(box_syntax)] - pub fn main() { - let _x: Box = box *"hello world"; + let _x: Box = Box::new(*"hello world"); //~^ ERROR E0277 let array: &[isize] = &[1, 2, 3]; - let _x: Box<[isize]> = box *array; + let _x: Box<[isize]> = Box::new(*array); //~^ ERROR E0277 } -- cgit v1.2.3