Skip to content

Commit 61cc892

Browse files
committed
Add regression test for rust-lang#66596
1 parent 485c5fb commit 61cc892

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// check-pass
2+
3+
#![feature(const_generics)]
4+
//~^ WARN the feature `const_generics` is incomplete and may cause the compiler to crash
5+
6+
trait Trait<const NAME: &'static str> {
7+
type Assoc;
8+
}
9+
10+
impl Trait<"0"> for () {
11+
type Assoc = ();
12+
}
13+
14+
fn main() {
15+
let _: <() as Trait<"0">>::Assoc = ();
16+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
warning: the feature `const_generics` is incomplete and may cause the compiler to crash
2+
--> $DIR/issue-66596-impl-trait-for-str-const-arg.rs:3:12
3+
|
4+
LL | #![feature(const_generics)]
5+
| ^^^^^^^^^^^^^^
6+
|
7+
= note: `#[warn(incomplete_features)]` on by default
8+

0 commit comments

Comments
 (0)