From 2063ebc3eac2587612fea57c2e48e7b6a78f9736 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Wed, 20 Sep 2023 02:25:49 +0000 Subject: [PATCH] bless the known-bug tests --- .../ui/consts/const-block-const-bound.stderr | 9 +++-- tests/ui/consts/fn_trait_refs.stderr | 26 +------------ .../impl-trait/normalize-tait-in-const.stderr | 8 +--- .../const-drop-bound.stderr | 23 +++-------- .../const-drop-fail-2.stderr | 9 +++-- .../const-drop-fail.precise.stderr | 7 ++-- .../const-drop-fail.stock.stderr | 9 +++-- .../const-drop.precise.stderr | 19 ++++++++-- .../const-drop.stock.stderr | 19 ++++++++-- .../const-impl-trait.stderr | 38 +------------------ .../issue-92111.stderr | 9 +++-- 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 6a001cca44d70..b402f0ea91548 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(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 b8d5fb7440177..658a0b7b2a084 100644 --- a/tests/ui/consts/fn_trait_refs.stderr +++ b/tests/ui/consts/fn_trait_refs.stderr @@ -16,12 +16,6 @@ error: ~const can only be applied to `#[const_trait]` traits 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 | @@ -34,12 +28,6 @@ error: ~const can only be applied to `#[const_trait]` traits 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 | @@ -64,12 +52,6 @@ error: ~const can only be applied to `#[const_trait]` traits 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 | @@ -82,18 +64,12 @@ error: ~const can only be applied to `#[const_trait]` traits 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 156c67d6ae00f..ada8fd7fa50ee 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 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 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 0142e343bb74b..f5147dc74b873 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(res: Result) -> Option 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 8e715169f18da..100d1df87d697 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) {} - | ^^^^^^^^ + | ^ - 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 ba73c782c8d45..dfa5ea8c4afa9 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) {} - | ^^^^^^^^ + | ^ 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 ba73c782c8d45..8af38b792e668 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) {} - | ^^^^^^^^ + | ^ - 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 5c2e6c5bd7db3..23e368870258e 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) {} - | ^^^^^^^^ + | ^ - 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 5c2e6c5bd7db3..23e368870258e 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) {} - | ^^^^^^^^ + | ^ - 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 ebd4e2160895d..f9078e227910d 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 @@ -16,60 +16,24 @@ error: ~const can only be applied to `#[const_trait]` traits 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 + ~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 90d3aee5202a3..b27f94f99ed74 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: 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`.