Add regression test for #66596
This commit is contained in:
parent
485c5fb6e1
commit
61cc8925b2
2 changed files with 24 additions and 0 deletions
|
|
@ -0,0 +1,16 @@
|
|||
// check-pass
|
||||
|
||||
#![feature(const_generics)]
|
||||
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
|
||||
|
||||
trait Trait<const NAME: &'static str> {
|
||||
type Assoc;
|
||||
}
|
||||
|
||||
impl Trait<"0"> for () {
|
||||
type Assoc = ();
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let _: <() as Trait<"0">>::Assoc = ();
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
|
||||
--> $DIR/issue-66596-impl-trait-for-str-const-arg.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