Add regression test for #62579
This commit is contained in:
parent
51c687446d
commit
cc7294c751
2 changed files with 23 additions and 0 deletions
15
src/test/ui/const-generics/issues/issue-62579-no-match.rs
Normal file
15
src/test/ui/const-generics/issues/issue-62579-no-match.rs
Normal file
|
|
@ -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}>();
|
||||
}
|
||||
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue