Skip to content

Commit

Permalink
Add test for issue-61747
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Dec 22, 2019
1 parent 101dd7b commit 7c485cc
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/test/ui/const-generics/issues/issue-61747.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// check-pass

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

struct Const<const N: usize>;

impl<const C: usize> Const<{C}> {
fn successor() -> Const<{C + 1}> {
Const
}
}

fn main() {
Const::<1>::successor();
}
8 changes: 8 additions & 0 deletions src/test/ui/const-generics/issues/issue-61747.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-61747.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^
|
= note: `#[warn(incomplete_features)]` on by default

0 comments on commit 7c485cc

Please sign in to comment.