From 20431706a863f92cb37dc512fef6e48d192aaf2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/consts/min_const_fn/min_const_fn.rs | 6 +++--- src/test/ui/consts/min_const_fn/min_const_fn.stderr | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src/test/ui/consts/min_const_fn') diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.rs b/src/test/ui/consts/min_const_fn/min_const_fn.rs index 0bafaf2e8..c2891488c 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.rs +++ b/src/test/ui/consts/min_const_fn/min_const_fn.rs @@ -34,7 +34,7 @@ const fn foo35(a: bool, b: bool) -> bool { a ^ b } struct Foo(T); impl Foo { const fn new(t: T) -> Self { Foo(t) } - const fn into_inner(self) -> T { self.0 } //~ destructors cannot be evaluated + const fn into_inner(self) -> T { self.0 } //~ destructor of const fn get(&self) -> &T { &self.0 } const fn get_mut(&mut self) -> &mut T { &mut self.0 } //~^ mutable references @@ -43,7 +43,7 @@ impl Foo { } impl<'a, T> Foo { const fn new_lt(t: T) -> Self { Foo(t) } - const fn into_inner_lt(self) -> T { self.0 } //~ destructors cannot be evaluated + const fn into_inner_lt(self) -> T { self.0 } //~ destructor of const fn get_lt(&'a self) -> &T { &self.0 } const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } //~^ mutable references @@ -52,7 +52,7 @@ impl<'a, T> Foo { } impl Foo { const fn new_s(t: T) -> Self { Foo(t) } - const fn into_inner_s(self) -> T { self.0 } //~ ERROR destructors + const fn into_inner_s(self) -> T { self.0 } //~ ERROR destructor const fn get_s(&self) -> &T { &self.0 } const fn get_mut_s(&mut self) -> &mut T { &mut self.0 } //~^ mutable references diff --git a/src/test/ui/consts/min_const_fn/min_const_fn.stderr b/src/test/ui/consts/min_const_fn/min_const_fn.stderr index 4ad17602c..11c79e8e2 100644 --- a/src/test/ui/consts/min_const_fn/min_const_fn.stderr +++ b/src/test/ui/consts/min_const_fn/min_const_fn.stderr @@ -1,10 +1,10 @@ -error[E0493]: destructors cannot be evaluated at compile-time +error[E0493]: destructor of `Foo` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:37:25 | LL | const fn into_inner(self) -> T { self.0 } | ^^^^ - value is dropped here | | - | constant functions cannot evaluate destructors + | the destructor for this type cannot be evaluated in constant functions error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:39:22 @@ -33,13 +33,13 @@ LL | const fn get_mut(&mut self) -> &mut T { &mut self.0 } = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable -error[E0493]: destructors cannot be evaluated at compile-time +error[E0493]: destructor of `Foo` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:46:28 | LL | const fn into_inner_lt(self) -> T { self.0 } | ^^^^ - value is dropped here | | - | constant functions cannot evaluate destructors + | the destructor for this type cannot be evaluated in constant functions error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:48:25 @@ -68,13 +68,13 @@ LL | const fn get_mut_lt(&'a mut self) -> &mut T { &mut self.0 } = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable -error[E0493]: destructors cannot be evaluated at compile-time +error[E0493]: destructor of `Foo` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:55:27 | LL | const fn into_inner_s(self) -> T { self.0 } | ^^^^ - value is dropped here | | - | constant functions cannot evaluate destructors + | the destructor for this type cannot be evaluated in constant functions error[E0658]: mutable references are not allowed in constant functions --> $DIR/min_const_fn.rs:57:24 @@ -191,21 +191,21 @@ LL | const fn inc(x: &mut i32) { *x += 1 } = note: see issue #57349 for more information = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable -error[E0493]: destructors cannot be evaluated at compile-time +error[E0493]: destructor of `AlanTuring` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:122:19 | LL | const fn no_apit2(_x: AlanTuring) {} | ^^ - value is dropped here | | - | constant functions cannot evaluate destructors + | the destructor for this type cannot be evaluated in constant functions -error[E0493]: destructors cannot be evaluated at compile-time +error[E0493]: destructor of `impl std::fmt::Debug` cannot be evaluated at compile-time --> $DIR/min_const_fn.rs:124:18 | LL | const fn no_apit(_x: impl std::fmt::Debug) {} | ^^ - value is dropped here | | - | constant functions cannot evaluate destructors + | the destructor for this type cannot be evaluated in constant functions error: aborting due to 24 previous errors -- cgit v1.2.3