diff options
Diffstat (limited to 'tests/ui/const-generics/bad-subst-const-kind.rs')
-rw-r--r-- | tests/ui/const-generics/bad-subst-const-kind.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/ui/const-generics/bad-subst-const-kind.rs b/tests/ui/const-generics/bad-subst-const-kind.rs new file mode 100644 index 000000000..e13dfbacd --- /dev/null +++ b/tests/ui/const-generics/bad-subst-const-kind.rs @@ -0,0 +1,13 @@ +// incremental +#![crate_type = "lib"] + +trait Q { + const ASSOC: usize; +} + +impl<const N: u64> Q for [u8; N] { + //~^ ERROR mismatched types + const ASSOC: usize = 1; +} + +pub fn test() -> [u8; <[u8; 13] as Q>::ASSOC] { todo!() } |