Skip to content

Commit 7fae41b

Browse files
committed
fix comment
1 parent 4ba5010 commit 7fae41b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/rustc_mir_build/src/build/block.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
107107
// the pattern matching passes, in the MIR building the storages for them
108108
// are declared as live any way.
109109
// This is similar to `let x;` statements without an initializer expression,
110-
// where the value of `x` in this example may or may be assigned,
110+
// where the value of `x` in this example may or may not be assigned,
111111
// because the storage for their values may not be live after all due to
112112
// failure in pattern matching.
113113
// For this reason, we declare those storages as live but we do not schedule

compiler/rustc_mir_build/src/build/scope.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1145,12 +1145,12 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
11451145
}
11461146
// Opaque type may not have been scheduled if its underlying
11471147
// type does not need drop.
1148-
None if self.local_decls[local].ty.has_opaque_types() => return,
11491148
_ => bug!(
1150-
"found wrong drop, expected value drop of {:?} in scope {:?}, found {:?}",
1149+
"found wrong drop, expected value drop of {:?} in scope {:?}, found {:?}, all scopes {:?}",
11511150
local,
11521151
region_scope,
11531152
drop,
1153+
self.scopes.scopes,
11541154
),
11551155
}
11561156
}

0 commit comments

Comments
 (0)