Skip to content

Commit

Permalink
test: add test for rust-lang#61432.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Aug 19, 2019
1 parent cb66500 commit 96fc989
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/ui/const-generics/issue-61432.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// run-pass

#![feature(const_generics)]
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash

fn promote<const N: i32>() {
// works:
//
// let n = N;
// &n;

&N;
}

fn main() {
promote::<0>();
}
8 changes: 8 additions & 0 deletions src/test/ui/const-generics/issue-61432.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/issue-61432.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default

0 comments on commit 96fc989

Please sign in to comment.