Skip to content

Commit a202924

Browse files
authored
Unrolled build for rust-lang#127245
Rollup merge of rust-lang#127245 - BoxyUwU:gce_hang_test, r=Nilstrieb Add a test for `generic_const_exprs` Fixes rust-lang#103770 r? ``@Nilstrieb``
2 parents d68fe4e + 8ce8c62 commit a202924

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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`.

0 commit comments

Comments
 (0)