1
Fork 0

Rollup merge of #100132 - compiler-errors:issue-100103, r=tmiasko

Use (actually) dummy place for let-else divergence

Fixes #100103
This commit is contained in:
Matthias Krüger 2022-08-06 16:15:56 +02:00 committed by GitHub
commit eabf1a2e8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View file

@ -2334,7 +2334,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
// This place is not really used because this destination place
// should never be used to take values at the end of the failure
// block.
let dummy_place = Place { local: RETURN_PLACE, projection: ty::List::empty() };
let dummy_place = self.temp(self.tcx.types.never, else_block.span);
let failure_block;
unpack!(
failure_block = self.ast_block(