2024-02-16 20:02:50 +00:00
|
|
|
//@ build-pass
|
2022-08-09 09:41:23 +00:00
|
|
|
|
|
|
|
|
#![allow(incomplete_features)]
|
|
|
|
|
#![feature(generic_const_exprs)]
|
|
|
|
|
|
|
|
|
|
use std::convert::AsMut;
|
|
|
|
|
use std::default::Default;
|
|
|
|
|
|
|
|
|
|
trait Foo: Sized {
|
|
|
|
|
type Baz: Default + AsMut<[u8]>;
|
|
|
|
|
fn bar() {
|
|
|
|
|
Self::Baz::default().as_mut();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Foo for () {
|
|
|
|
|
type Baz = [u8; 1 * 1];
|
|
|
|
|
//type Baz = [u8; 1];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
<() as Foo>::bar();
|
|
|
|
|
}
|