diff options
| author | varkor <github@varkor.com> | 2020-10-02 02:21:15 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2020-10-02 02:22:01 +0100 |
| commit | 1db05e032db798b3162926ee4b72072d3c4de56f (patch) | |
| tree | 9affc7d1b0c5c1ec3c2bb8677370c427c768e352 /src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs | |
| parent | 0801263279bbd44b7dbe88d5039a6b810a037f3b (diff) | |
| download | rust-1db05e032db798b3162926ee4b72072d3c4de56f.tar.gz rust-1db05e032db798b3162926ee4b72072d3c4de56f.zip | |
Add various `min_const_generics` regression tests
Diffstat (limited to 'src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs')
| -rw-r--r-- | src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs b/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs new file mode 100644 index 00000000000..0ef17109bed --- /dev/null +++ b/src/test/ui/const-generics/min_const_generics/static-reference-array-const-param.rs @@ -0,0 +1,8 @@ +#![feature(min_const_generics)] + +fn a<const X: &'static [u32]>() {} +//~^ ERROR `&'static [u32]` is forbidden as the type of a const generic parameter + +fn main() { + a::<{&[]}>(); +} |
