]>
Commit | Line | Data |
---|---|---|
f2b60f7d FG |
1 | // build-pass |
2 | ||
3 | #![allow(incomplete_features)] | |
4 | #![feature(generic_const_exprs)] | |
5 | ||
6 | use std::convert::AsMut; | |
7 | use std::default::Default; | |
8 | ||
9 | trait Foo: Sized { | |
10 | type Baz: Default + AsMut<[u8]>; | |
11 | fn bar() { | |
12 | Self::Baz::default().as_mut(); | |
13 | } | |
14 | } | |
15 | ||
16 | impl Foo for () { | |
17 | type Baz = [u8; 1 * 1]; | |
18 | //type Baz = [u8; 1]; | |
19 | } | |
20 | ||
21 | fn main() { | |
22 | <() as Foo>::bar(); | |
23 | } |