Skip to content

Commit 10d6f2d

Browse files
committedOct 21, 2020
Add regression test for #73298
1 parent 1d27267 commit 10d6f2d

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
 
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// build-pass
2+
// revisions: full min
3+
4+
#![cfg_attr(full, feature(const_generics))]
5+
#![cfg_attr(full, allow(incomplete_features))]
6+
#![cfg_attr(min, feature(min_const_generics))]
7+
8+
use std::convert::AsMut;
9+
use std::default::Default;
10+
11+
trait Foo: Sized {
12+
type Baz: Default + AsMut<[u8]>;
13+
fn bar() {
14+
Self::Baz::default().as_mut();
15+
}
16+
}
17+
18+
impl Foo for () {
19+
type Baz = [u8; 1 * 1];
20+
}
21+
22+
fn main() {
23+
<() as Foo>::bar();
24+
}

0 commit comments

Comments
 (0)