diff options
| author | varkor <github@varkor.com> | 2019-10-23 17:09:56 +0100 |
|---|---|---|
| committer | varkor <github@varkor.com> | 2019-10-23 17:09:56 +0100 |
| commit | cc7294c751fd700b77c3556eaae8507661f08f22 (patch) | |
| tree | 59676d5b14fd3c9dcf359a7361c28c0b74fc1730 | |
| parent | 51c687446d65fe271972f6371639334bb10da6db (diff) | |
| download | rust-cc7294c751fd700b77c3556eaae8507661f08f22.tar.gz rust-cc7294c751fd700b77c3556eaae8507661f08f22.zip | |
Add regression test for #62579
| -rw-r--r-- | src/test/ui/const-generics/issues/issue-62579-no-match.rs | 15 | ||||
| -rw-r--r-- | src/test/ui/const-generics/issues/issue-62579-no-match.stderr | 8 |
2 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/issues/issue-62579-no-match.rs b/src/test/ui/const-generics/issues/issue-62579-no-match.rs new file mode 100644 index 00000000000..0ff7ddc41fe --- /dev/null +++ b/src/test/ui/const-generics/issues/issue-62579-no-match.rs @@ -0,0 +1,15 @@ +// run-pass + +#![feature(const_generics)] +//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash + +#[derive(PartialEq, Eq)] +struct NoMatch; + +fn foo<const T: NoMatch>() -> bool { + true +} + +fn main() { + foo::<{NoMatch}>(); +} diff --git a/src/test/ui/const-generics/issues/issue-62579-no-match.stderr b/src/test/ui/const-generics/issues/issue-62579-no-match.stderr new file mode 100644 index 00000000000..759d5fdeb4c --- /dev/null +++ b/src/test/ui/const-generics/issues/issue-62579-no-match.stderr @@ -0,0 +1,8 @@ +warning: the feature `const_generics` is incomplete and may cause the compiler to crash + --> $DIR/issue-62579-no-match.rs:3:12 + | +LL | #![feature(const_generics)] + | ^^^^^^^^^^^^^^ + | + = note: `#[warn(incomplete_features)]` on by default + |
