diff options
11 files changed, 67 insertions, 109 deletions
diff --git a/tests/ui/consts/const-block-const-bound.stderr b/tests/ui/consts/const-block-const-bound.stderr index 6a001cca44d..b402f0ea915 100644 --- a/tests/ui/consts/const-block-const-bound.stderr +++ b/tests/ui/consts/const-block-const-bound.stderr @@ -1,8 +1,11 @@ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-block-const-bound.rs:8:22 +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/const-block-const-bound.rs:8:32 | LL | const fn f<T: ~const Destruct>(x: T) {} - | ^^^^^^^^ + | ^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions error: aborting due to previous error +For more information about this error, try `rustc --explain E0493`. diff --git a/tests/ui/consts/fn_trait_refs.stderr b/tests/ui/consts/fn_trait_refs.stderr index b8d5fb74401..658a0b7b2a0 100644 --- a/tests/ui/consts/fn_trait_refs.stderr +++ b/tests/ui/consts/fn_trait_refs.stderr @@ -17,12 +17,6 @@ LL | T: ~const Fn<()> + ~const Destruct, | ^^^^^^ error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:15:31 - | -LL | T: ~const Fn<()> + ~const Destruct, - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits --> $DIR/fn_trait_refs.rs:15:15 | LL | T: ~const Fn<()> + ~const Destruct, @@ -35,12 +29,6 @@ LL | T: ~const FnMut<()> + ~const Destruct, | ^^^^^^^^^ error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:22:34 - | -LL | T: ~const FnMut<()> + ~const Destruct, - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits --> $DIR/fn_trait_refs.rs:22:15 | LL | T: ~const FnMut<()> + ~const Destruct, @@ -65,12 +53,6 @@ LL | T: ~const Fn<()> + ~const Destruct, | ^^^^^^ error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:36:31 - | -LL | T: ~const Fn<()> + ~const Destruct, - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits --> $DIR/fn_trait_refs.rs:36:15 | LL | T: ~const Fn<()> + ~const Destruct, @@ -83,17 +65,11 @@ LL | T: ~const FnMut<()> + ~const Destruct, | ^^^^^^^^^ error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/fn_trait_refs.rs:50:34 - | -LL | T: ~const FnMut<()> + ~const Destruct, - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits --> $DIR/fn_trait_refs.rs:50:15 | LL | T: ~const FnMut<()> + ~const Destruct, | ^^^^^^^^^ -error: aborting due to 16 previous errors +error: aborting due to 12 previous errors For more information about this error, try `rustc --explain E0635`. diff --git a/tests/ui/impl-trait/normalize-tait-in-const.stderr b/tests/ui/impl-trait/normalize-tait-in-const.stderr index 156c67d6ae0..ada8fd7fa50 100644 --- a/tests/ui/impl-trait/normalize-tait-in-const.stderr +++ b/tests/ui/impl-trait/normalize-tait-in-const.stderr @@ -4,11 +4,5 @@ error: ~const can only be applied to `#[const_trait]` traits LL | const fn with_positive<F: ~const for<'a> Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) { | ^^^^^^^^^^^^^^^^^ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/normalize-tait-in-const.rs:25:69 - | -LL | const fn with_positive<F: ~const for<'a> Fn(&'a Alias<'a>) + ~const Destruct>(fun: F) { - | ^^^^^^^^ - -error: aborting due to 2 previous errors +error: aborting due to previous error diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr index 0142e343bb7..f5147dc74b8 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-bound.stderr @@ -1,20 +1,9 @@ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-drop-bound.rs:9:68 +error[E0493]: destructor of `E` cannot be evaluated at compile-time + --> $DIR/const-drop-bound.rs:12:13 | -LL | const fn foo<T, E>(res: Result<T, E>) -> Option<T> where E: ~const Destruct { - | ^^^^^^^^ +LL | Err(_e) => None, + | ^^ the destructor for this type cannot be evaluated in constant functions -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-drop-bound.rs:20:15 - | -LL | T: ~const Destruct, - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-drop-bound.rs:21:15 - | -LL | E: ~const Destruct, - | ^^^^^^^^ - -error: aborting due to 3 previous errors +error: aborting due to previous error +For more information about this error, try `rustc --explain E0493`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr index 8e715169f18..100d1df87d6 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail-2.stderr @@ -1,8 +1,11 @@ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-drop-fail-2.rs:21:26 +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/const-drop-fail-2.rs:21:36 | LL | const fn check<T: ~const Destruct>(_: T) {} - | ^^^^^^^^ + | ^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions error: aborting due to previous error +For more information about this error, try `rustc --explain E0493`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr index ba73c782c8d..dfa5ea8c4af 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr @@ -1,8 +1,9 @@ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-drop-fail.rs:24:26 +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/const-drop-fail.rs:24:36 | LL | const fn check<T: ~const Destruct>(_: T) {} - | ^^^^^^^^ + | ^ the destructor for this type cannot be evaluated in constant functions error: aborting due to previous error +For more information about this error, try `rustc --explain E0493`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr index ba73c782c8d..8af38b792e6 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr @@ -1,8 +1,11 @@ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-drop-fail.rs:24:26 +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/const-drop-fail.rs:24:36 | LL | const fn check<T: ~const Destruct>(_: T) {} - | ^^^^^^^^ + | ^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions error: aborting due to previous error +For more information about this error, try `rustc --explain E0493`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr index 5c2e6c5bd7d..23e36887025 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.precise.stderr @@ -1,8 +1,19 @@ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-drop.rs:19:22 +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/const-drop.rs:19:32 | LL | const fn a<T: ~const Destruct>(_: T) {} - | ^^^^^^^^ + | ^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions -error: aborting due to previous error +error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time + --> $DIR/const-drop.rs:24:13 + | +LL | let _ = S(&mut c); + | ^^^^^^^^^- value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions + +error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0493`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr index 5c2e6c5bd7d..23e36887025 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-drop.stock.stderr @@ -1,8 +1,19 @@ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-drop.rs:19:22 +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/const-drop.rs:19:32 | LL | const fn a<T: ~const Destruct>(_: T) {} - | ^^^^^^^^ + | ^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions -error: aborting due to previous error +error[E0493]: destructor of `S<'_>` cannot be evaluated at compile-time + --> $DIR/const-drop.rs:24:13 + | +LL | let _ = S(&mut c); + | ^^^^^^^^^- value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions + +error: aborting due to 2 previous errors +For more information about this error, try `rustc --explain E0493`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr index ebd4e216089..f9078e22791 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/const-impl-trait.stderr @@ -17,59 +17,23 @@ LL | const fn wrap(x: impl ~const PartialEq + ~const Destruct) | ^^^^^^^^^ error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-impl-trait.rs:16:49 - | -LL | const fn wrap(x: impl ~const PartialEq + ~const Destruct) - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits --> $DIR/const-impl-trait.rs:17:20 | LL | -> impl ~const PartialEq + ~const Destruct | ^^^^^^^^^ error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-impl-trait.rs:17:39 - | -LL | -> impl ~const PartialEq + ~const Destruct - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits --> $DIR/const-impl-trait.rs:24:29 | LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy; | ^^^^^^^^^ error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-impl-trait.rs:24:48 - | -LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy; - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits --> $DIR/const-impl-trait.rs:28:29 | LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy { | ^^^^^^^^^ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-impl-trait.rs:28:48 - | -LL | fn huh() -> impl ~const PartialEq + ~const Destruct + Copy { - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-impl-trait.rs:49:41 - | -LL | const fn apit(_: impl ~const T + ~const Destruct) {} - | ^^^^^^^^ - -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/const-impl-trait.rs:53:73 - | -LL | const fn apit_assoc_bound(_: impl IntoIterator<Item: ~const T> + ~const Destruct) {} - | ^^^^^^^^ - -error: aborting due to 12 previous errors +error: aborting due to 6 previous errors For more information about this error, try `rustc --explain E0635`. diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr index 90d3aee5202..b27f94f99ed 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/issue-92111.stderr @@ -1,8 +1,11 @@ -error: ~const can only be applied to `#[const_trait]` traits - --> $DIR/issue-92111.rs:20:22 +error[E0493]: destructor of `T` cannot be evaluated at compile-time + --> $DIR/issue-92111.rs:20:32 | LL | const fn a<T: ~const Destruct>(t: T) {} - | ^^^^^^^^ + | ^ - value is dropped here + | | + | the destructor for this type cannot be evaluated in constant functions error: aborting due to previous error +For more information about this error, try `rustc --explain E0493`. |
