Rollup merge of #40372 - nagisa:never-drop, r=eddyb
Do not bother creating StorageLive for TyNever Keeps MIR cleaner, `StorageLive(_: !)` makes no sense anyway. r? @eddyb
This commit is contained in:
commit
66436b5a2a
@ -55,7 +55,7 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
|
||||
(https://github.com/rust-lang/rust/issues/39283)");
|
||||
}
|
||||
|
||||
if temp_lifetime.is_some() {
|
||||
if !expr_ty.is_never() && temp_lifetime.is_some() {
|
||||
this.cfg.push(block, Statement {
|
||||
source_info: source_info,
|
||||
kind: StatementKind::StorageLive(temp.clone())
|
||||
|
@ -35,7 +35,6 @@ fn main() {
|
||||
// }
|
||||
//
|
||||
// bb2: {
|
||||
// StorageLive(_6);
|
||||
// _0 = ();
|
||||
// StorageDead(_4);
|
||||
// StorageDead(_1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user