Skip to content

Commit 7508086

Browse files
committed
Don't ICE when relating const type args
1 parent 08bfe16 commit 7508086

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
struct B<const I: u8>; //~ ERROR const generics are unstable
2+
3+
impl B<0> {
4+
fn bug() -> Self {
5+
panic!()
6+
}
7+
}
8+
9+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error[E0658]: const generics are unstable
2+
--> $DIR/issue-60263.rs:1:16
3+
|
4+
LL | struct B<const I: u8>;
5+
| ^
6+
|
7+
= note: for more information, see https://github.com/rust-lang/rust/issues/44580
8+
= help: add #![feature(const_generics)] to the crate attributes to enable
9+
10+
error: aborting due to previous error
11+
12+
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)