diff options
| author | varkor <github@varkor.com> | 2019-03-22 01:49:42 +0000 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-03-22 01:49:42 +0000 |
| commit | f94f85bebde816d78d8a7e6d8ebb75b2a254593c (patch) | |
| tree | a0a2d29794a982a992ec0fae9d1ada390c7c0c90 /src/test/ui/const-generics/struct-with-invalid-const-param.rs | |
| parent | 7a4df3b53da369110984a2b57419c05a53e33b38 (diff) | |
| download | rust-f94f85bebde816d78d8a7e6d8ebb75b2a254593c.tar.gz rust-f94f85bebde816d78d8a7e6d8ebb75b2a254593c.zip | |
Fix ICE with const generic param in struct
Diffstat (limited to 'src/test/ui/const-generics/struct-with-invalid-const-param.rs')
| -rw-r--r-- | src/test/ui/const-generics/struct-with-invalid-const-param.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/struct-with-invalid-const-param.rs b/src/test/ui/const-generics/struct-with-invalid-const-param.rs new file mode 100644 index 00000000000..207b07bf695 --- /dev/null +++ b/src/test/ui/const-generics/struct-with-invalid-const-param.rs @@ -0,0 +1,6 @@ +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +struct S<const C: u8>(C); //~ ERROR expected type, found const parameter + +fn main() {} |
