Skip to content

Commit 832894a

Browse files
matthiaskrgrRenjiSann
authored andcommitted
1 parent 03a844c commit 832894a

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// issue: rust-lang/rust#107228
2+
// ICE broken MIR in DropGlue
3+
//@ compile-flags: -Zvalidate-mir
4+
//@ check-pass
5+
6+
#![feature(specialization)]
7+
#![crate_type="lib"]
8+
#![allow(incomplete_features)]
9+
10+
pub(crate) trait SpecTrait {
11+
type Assoc;
12+
}
13+
14+
impl<C> SpecTrait for C {
15+
default type Assoc = Vec<Self>;
16+
}
17+
18+
pub(crate) struct AssocWrap<C: SpecTrait> {
19+
_assoc: C::Assoc,
20+
}
21+
22+
fn instantiate<C: SpecTrait>() -> AssocWrap<C> {
23+
loop {}
24+
}
25+
26+
pub fn main() {
27+
instantiate::<()>();
28+
}

0 commit comments

Comments
 (0)