Skip to content

Commit

Permalink
Add a regression test for const parameters with impl Trait
Browse files Browse the repository at this point in the history
  • Loading branch information
varkor committed May 29, 2019
1 parent eafa3a8 commit 998ef68
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/ui/const-generics/apit-with-const-param.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// run-pass

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

trait Trait {}

fn f<const N: usize>(_: impl Trait) {}

fn main() {}
6 changes: 6 additions & 0 deletions src/test/ui/const-generics/apit-with-const-param.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
--> $DIR/apit-with-const-param.rs:3:12
|
LL | #![feature(const_generics)]
| ^^^^^^^^^^^^^^

0 comments on commit 998ef68

Please sign in to comment.