File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
tests/ui/const-generics/generic_const_exprs Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ #![ feature( generic_const_exprs) ]
2+ #![ feature( adt_const_params) ]
3+ #![ allow( incomplete_features) ]
4+ #![ allow( dead_code) ]
5+
6+ #[ derive( PartialEq , Eq ) ]
7+ struct U ;
8+
9+ struct S < const N : U > ( )
10+ where
11+ S < { U } > : ;
12+ //~^ ERROR: overflow evaluating the requirement `S<{ U }> well-formed`
13+
14+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error[E0275]: overflow evaluating the requirement `S<{ U }> well-formed`
2+ --> $DIR/adt_wf_hang.rs:11:5
3+ |
4+ LL | S<{ U }>:;
5+ | ^^^^^^^^
6+ |
7+ note: required by a bound in `S`
8+ --> $DIR/adt_wf_hang.rs:11:5
9+ |
10+ LL | struct S<const N: U>()
11+ | - required by a bound in this struct
12+ LL | where
13+ LL | S<{ U }>:;
14+ | ^^^^^^^^ required by this bound in `S`
15+
16+ error: aborting due to 1 previous error
17+
18+ For more information about this error, try `rustc --explain E0275`.
You can’t perform that action at this time.
0 commit comments