add test
This commit is contained in:
parent
7d97c59438
commit
8ce8c62f1e
2 changed files with 32 additions and 0 deletions
14
tests/ui/const-generics/generic_const_exprs/adt_wf_hang.rs
Normal file
14
tests/ui/const-generics/generic_const_exprs/adt_wf_hang.rs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
#![feature(generic_const_exprs)]
|
||||||
|
#![feature(adt_const_params)]
|
||||||
|
#![allow(incomplete_features)]
|
||||||
|
#![allow(dead_code)]
|
||||||
|
|
||||||
|
#[derive(PartialEq, Eq)]
|
||||||
|
struct U;
|
||||||
|
|
||||||
|
struct S<const N: U>()
|
||||||
|
where
|
||||||
|
S<{ U }>:;
|
||||||
|
//~^ ERROR: overflow evaluating the requirement `S<{ U }> well-formed`
|
||||||
|
|
||||||
|
fn main() {}
|
|
@ -0,0 +1,18 @@
|
||||||
|
error[E0275]: overflow evaluating the requirement `S<{ U }> well-formed`
|
||||||
|
--> $DIR/adt_wf_hang.rs:11:5
|
||||||
|
|
|
||||||
|
LL | S<{ U }>:;
|
||||||
|
| ^^^^^^^^
|
||||||
|
|
|
||||||
|
note: required by a bound in `S`
|
||||||
|
--> $DIR/adt_wf_hang.rs:11:5
|
||||||
|
|
|
||||||
|
LL | struct S<const N: U>()
|
||||||
|
| - required by a bound in this struct
|
||||||
|
LL | where
|
||||||
|
LL | S<{ U }>:;
|
||||||
|
| ^^^^^^^^ required by this bound in `S`
|
||||||
|
|
||||||
|
error: aborting due to 1 previous error
|
||||||
|
|
||||||
|
For more information about this error, try `rustc --explain E0275`.
|
Loading…
Add table
Add a link
Reference in a new issue