Skip to content

Commit 998ef68

Browse files
committed
Add a regression test for const parameters with impl Trait
1 parent eafa3a8 commit 998ef68

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Diff for: src/test/ui/const-generics/apit-with-const-param.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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+
trait Trait {}
7+
8+
fn f<const N: usize>(_: impl Trait) {}
9+
10+
fn main() {}
+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2+
--> $DIR/apit-with-const-param.rs:3:12
3+
|
4+
LL | #![feature(const_generics)]
5+
| ^^^^^^^^^^^^^^
6+

0 commit comments

Comments
 (0)