From a400f1058e53cf9603e82b7fd00d42df159b8361 Mon Sep 17 00:00:00 2001 From: Dominik Stolz Date: Tue, 12 Oct 2021 22:47:34 +0200 Subject: [PATCH] Bless tests --- .../const-generics/issues/issue-67375.full.stderr | 12 +----------- src/test/ui/const-generics/issues/issue-67375.rs | 2 +- .../issues/issue-67945-1.full.stderr | 14 ++------------ src/test/ui/const-generics/issues/issue-67945-1.rs | 2 +- 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/src/test/ui/const-generics/issues/issue-67375.full.stderr b/src/test/ui/const-generics/issues/issue-67375.full.stderr index 0f0e339655bca..0cf69879a5c20 100644 --- a/src/test/ui/const-generics/issues/issue-67375.full.stderr +++ b/src/test/ui/const-generics/issues/issue-67375.full.stderr @@ -8,15 +8,5 @@ LL | inner: [(); { [|_: &T| {}; 0].len() }], | = help: consider moving this anonymous constant into a `const` function -error[E0392]: parameter `T` is never used - --> $DIR/issue-67375.rs:5:12 - | -LL | struct Bug { - | ^ unused parameter - | - = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData` - = help: if you intended `T` to be a const parameter, use `const T: usize` instead - -error: aborting due to 2 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0392`. diff --git a/src/test/ui/const-generics/issues/issue-67375.rs b/src/test/ui/const-generics/issues/issue-67375.rs index b5b842a15ae0c..8b4b276bae0ba 100644 --- a/src/test/ui/const-generics/issues/issue-67375.rs +++ b/src/test/ui/const-generics/issues/issue-67375.rs @@ -3,7 +3,7 @@ #![cfg_attr(full, feature(generic_const_exprs))] struct Bug { - //~^ ERROR parameter `T` is never used + //[min]~^ ERROR parameter `T` is never used inner: [(); { [|_: &T| {}; 0].len() }], //[min]~^ ERROR generic parameters may not be used in const operations //[full]~^^ ERROR overly complex generic constant diff --git a/src/test/ui/const-generics/issues/issue-67945-1.full.stderr b/src/test/ui/const-generics/issues/issue-67945-1.full.stderr index 1edc7828caad2..8e18fcdffab70 100644 --- a/src/test/ui/const-generics/issues/issue-67945-1.full.stderr +++ b/src/test/ui/const-generics/issues/issue-67945-1.full.stderr @@ -12,16 +12,6 @@ LL | let x: S = MaybeUninit::uninit(); = note: expected type parameter `S` found union `MaybeUninit<_>` -error[E0392]: parameter `S` is never used - --> $DIR/issue-67945-1.rs:7:12 - | -LL | struct Bug { - | ^ unused parameter - | - = help: consider removing `S`, referring to it in a field, or using a marker such as `PhantomData` - = help: if you intended `S` to be a const parameter, use `const S: usize` instead - -error: aborting due to 2 previous errors +error: aborting due to previous error -Some errors have detailed explanations: E0308, E0392. -For more information about an error, try `rustc --explain E0308`. +For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/const-generics/issues/issue-67945-1.rs b/src/test/ui/const-generics/issues/issue-67945-1.rs index 7b7e8428639c7..99f88bc8e1055 100644 --- a/src/test/ui/const-generics/issues/issue-67945-1.rs +++ b/src/test/ui/const-generics/issues/issue-67945-1.rs @@ -5,7 +5,7 @@ use std::mem::MaybeUninit; struct Bug { - //~^ ERROR parameter `S` is never used + //[min]~^ ERROR parameter `S` is never used A: [(); { let x: S = MaybeUninit::uninit(); //[min]~^ ERROR generic parameters may not be used in const operations