Skip to content

Commit

Permalink
Bless tests
Browse files Browse the repository at this point in the history
  • Loading branch information
voidc committed Oct 12, 2021
1 parent 59b36bc commit a400f10
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 25 deletions.
12 changes: 1 addition & 11 deletions src/test/ui/const-generics/issues/issue-67375.full.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> {
| ^ 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`.
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/issues/issue-67375.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![cfg_attr(full, feature(generic_const_exprs))]

struct Bug<T> {
//~^ 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
Expand Down
14 changes: 2 additions & 12 deletions src/test/ui/const-generics/issues/issue-67945-1.full.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -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<S> {
| ^ 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`.
2 changes: 1 addition & 1 deletion src/test/ui/const-generics/issues/issue-67945-1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use std::mem::MaybeUninit;

struct Bug<S> {
//~^ 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
Expand Down

0 comments on commit a400f10

Please sign in to comment.