Bless tests
This commit is contained in:
parent
59b36bcfb5
commit
a400f1058e
4 changed files with 5 additions and 25 deletions
|
@ -8,15 +8,5 @@ LL | inner: [(); { [|_: &T| {}; 0].len() }],
|
||||||
|
|
|
|
||||||
= help: consider moving this anonymous constant into a `const` function
|
= help: consider moving this anonymous constant into a `const` function
|
||||||
|
|
||||||
error[E0392]: parameter `T` is never used
|
error: aborting due to previous error
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0392`.
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#![cfg_attr(full, feature(generic_const_exprs))]
|
#![cfg_attr(full, feature(generic_const_exprs))]
|
||||||
|
|
||||||
struct Bug<T> {
|
struct Bug<T> {
|
||||||
//~^ ERROR parameter `T` is never used
|
//[min]~^ ERROR parameter `T` is never used
|
||||||
inner: [(); { [|_: &T| {}; 0].len() }],
|
inner: [(); { [|_: &T| {}; 0].len() }],
|
||||||
//[min]~^ ERROR generic parameters may not be used in const operations
|
//[min]~^ ERROR generic parameters may not be used in const operations
|
||||||
//[full]~^^ ERROR overly complex generic constant
|
//[full]~^^ ERROR overly complex generic constant
|
||||||
|
|
|
@ -12,16 +12,6 @@ LL | let x: S = MaybeUninit::uninit();
|
||||||
= note: expected type parameter `S`
|
= note: expected type parameter `S`
|
||||||
found union `MaybeUninit<_>`
|
found union `MaybeUninit<_>`
|
||||||
|
|
||||||
error[E0392]: parameter `S` is never used
|
error: aborting due to previous error
|
||||||
--> $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
|
For more information about this error, try `rustc --explain E0308`.
|
||||||
|
|
||||||
Some errors have detailed explanations: E0308, E0392.
|
|
||||||
For more information about an error, try `rustc --explain E0308`.
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
use std::mem::MaybeUninit;
|
use std::mem::MaybeUninit;
|
||||||
|
|
||||||
struct Bug<S> {
|
struct Bug<S> {
|
||||||
//~^ ERROR parameter `S` is never used
|
//[min]~^ ERROR parameter `S` is never used
|
||||||
A: [(); {
|
A: [(); {
|
||||||
let x: S = MaybeUninit::uninit();
|
let x: S = MaybeUninit::uninit();
|
||||||
//[min]~^ ERROR generic parameters may not be used in const operations
|
//[min]~^ ERROR generic parameters may not be used in const operations
|
||||||
|
|
Loading…
Reference in a new issue