Add a regression test for const parameters with impl Trait
This commit is contained in:
parent
eafa3a888f
commit
998ef688a3
10
src/test/ui/const-generics/apit-with-const-param.rs
Normal file
10
src/test/ui/const-generics/apit-with-const-param.rs
Normal file
@ -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
src/test/ui/const-generics/apit-with-const-param.stderr
Normal file
6
src/test/ui/const-generics/apit-with-const-param.stderr
Normal file
@ -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)]
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
Loading…
x
Reference in New Issue
Block a user