I tried this code:
trait Foo {
const ASSOC: [u8];
}
fn bar<T: Foo>() {
let a = [T::ASSOC; 2];
}
fn main() {}
I expected to see this happen: It should not compile as the local variable a has type [[u8]; 2] which is not well formed
Instead, this happened: it compiled 😬
Meta
playground version:
Nightly channel
Build using the Nightly version: 1.71.0-nightly
(2023-04-30 9ecda8de85ce893cc3fc)
Backtrace
I tried this code:
I expected to see this happen: It should not compile as the local variable
ahas type[[u8]; 2]which is not well formedInstead, this happened: it compiled 😬
Meta
playground version:Backtrace