diff options
Diffstat (limited to 'src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs')
| -rw-r--r-- | src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs new file mode 100644 index 00000000000..b677dcc4af4 --- /dev/null +++ b/src/test/ui/const-generics/issue-66596-impl-trait-for-str-const-arg.rs @@ -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 = (); +} |
