Commit 3e0db6a
committed
Work around opaque types hiding needs_drop
When building the MIR we sometimes try to unschedule drops. In this we
assert that the drop has already been scheduled. Opaque types however
may be initialized with an expression kind that we know doesn't have a
type that needs to be dropped. To fix this we don't panic if we can't
find the drop of a variable with an opaque type.1 parent 8b4edef commit 3e0db6a
File tree
2 files changed
+26
-0
lines changed- compiler/rustc_mir_build/src/build
- tests/ui/impl-trait/rpit
2 files changed
+26
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
1141 | 1142 | | |
1142 | 1143 | | |
1143 | 1144 | | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
1144 | 1148 | | |
1145 | 1149 | | |
1146 | 1150 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
0 commit comments