Skip to content

Commit 96fc989

Browse files
committed
test: add test for #61432.
1 parent cb66500 commit 96fc989

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// run-pass
2+
3+
#![feature(const_generics)]
4+
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
5+
6+
fn promote<const N: i32>() {
7+
// works:
8+
//
9+
// let n = N;
10+
// &n;
11+
12+
&N;
13+
}
14+
15+
fn main() {
16+
promote::<0>();
17+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2+
--> $DIR/issue-61432.rs:3:12
3+
|
4+
LL | #![feature(const_generics)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+

0 commit comments

Comments
 (0)