mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
24 lines
365 B
Rust
24 lines
365 B
Rust
// build-pass
|
|
|
|
#![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();
|
|
}
|