diff options
| author | varkor <github@varkor.com> | 2019-05-30 00:21:04 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-05-30 00:21:04 +0100 |
| commit | 998ef688a39a1b842b5d0a71ea92a8f825650975 (patch) | |
| tree | 98e1679f895db8dd792a640270adc55969ff263b | |
| parent | eafa3a888f1aac52a7499fb464414519c434a7ce (diff) | |
| download | rust-998ef688a39a1b842b5d0a71ea92a8f825650975.tar.gz rust-998ef688a39a1b842b5d0a71ea92a8f825650975.zip | |
Add a regression test for const parameters with impl Trait
| -rw-r--r-- | src/test/ui/const-generics/apit-with-const-param.rs | 10 | ||||
| -rw-r--r-- | src/test/ui/const-generics/apit-with-const-param.stderr | 6 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/apit-with-const-param.rs b/src/test/ui/const-generics/apit-with-const-param.rs new file mode 100644 index 00000000000..70e718d8890 --- /dev/null +++ b/src/test/ui/const-generics/apit-with-const-param.rs @@ -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() {} diff --git a/src/test/ui/const-generics/apit-with-const-param.stderr b/src/test/ui/const-generics/apit-with-const-param.stderr new file mode 100644 index 00000000000..b3038ee6488 --- /dev/null +++ b/src/test/ui/const-generics/apit-with-const-param.stderr @@ -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)] + | ^^^^^^^^^^^^^^ + |
