We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03a844c commit 832894aCopy full SHA for 832894a
tests/ui/specialization/broken-mir-drop-glue-107228.rs
@@ -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