Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #100395

Merged
merged 22 commits into from
Sep 2, 2022
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
847f461
Never inline Windows dtor access
ChrisDenton Aug 1, 2022
127b6c4
cleanup code w/ pointers in std a little
WaffleLapkin Aug 1, 2022
a7c45ec
improve documentation of `pointer::align_offset`
WaffleLapkin Aug 1, 2022
18a21e1
Remove duplicated temporaries creating during box derefs elaboration
tmiasko Aug 6, 2022
7d2131a
./x.py test --bless
tmiasko Aug 6, 2022
d52ed82
move an `assert!` to the right place
WaffleLapkin Aug 9, 2022
5938fd7
rustdoc: simplify highlight.rs
jsha Jul 16, 2022
16bcc18
Improve crate selection on rustdoc search results page
steffahn Jul 3, 2022
e957480
Two small improvements:
steffahn Jul 11, 2022
107e039
Add missing ID into the ID map
GuillaumeGomez Aug 10, 2022
ea05be2
Update GUI test
GuillaumeGomez Aug 10, 2022
e1e25a8
Generalize trait object generic param check to aliases.
cjgillot Aug 7, 2022
0df84ae
Ban indirect references to `Self` too.
cjgillot Aug 7, 2022
a3b84ad
Check if extern crate enum has non exhaustive variant when cast
Jan 10, 2022
dfb3713
Update error message to clarify that it's not the enum itself that's …
scottmcm Aug 10, 2022
23acd82
Rollup merge of #92744 - lambinoo:I-91161-non-exhaustive-foreign-vari…
Dylan-DPC Aug 11, 2022
72d0be4
Rollup merge of #99337 - jsha:simplify-highlight, r=GuillaumeGomez
Dylan-DPC Aug 11, 2022
5b2ad6e
Rollup merge of #100007 - ChrisDenton:dtor-inline-never, r=michaelwoe…
Dylan-DPC Aug 11, 2022
8bdb414
Rollup merge of #100030 - WaffleLapkin:nice_pointer_sis, r=scottmcm
Dylan-DPC Aug 11, 2022
58dc085
Rollup merge of #100192 - tmiasko:rm-duplicated-locals, r=nagisa
Dylan-DPC Aug 11, 2022
a9f3a27
Rollup merge of #100247 - cjgillot:verify-dyn-trait-alias-defaults, r…
Dylan-DPC Aug 11, 2022
5a5cd6b
Rollup merge of #100374 - GuillaumeGomez:improve_rustdoc_search_resul…
Dylan-DPC Aug 11, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove duplicated temporaries creating during box derefs elaboration
Temporaries created with `MirPatch::new_temp` will be declared after
patch application. Remove manually created duplicate declarations.

Removing duplicates exposes another issue. Visitor elaborates
terminator twice and attempts to access new, but not yet available,
local declarations. Remove duplicated call to `visit_terminator`.
  • Loading branch information
tmiasko committed Aug 6, 2022
commit 18a21e13b49320bc20836d5d20da82375fac2bbd
8 changes: 0 additions & 8 deletions compiler/rustc_mir_transform/src/elaborate_box_derefs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ impl<'tcx, 'a> MutVisitor<'tcx> for ElaborateBoxDerefVisitor<'tcx, 'a> {
build_ptr_tys(tcx, base_ty.boxed_ty(), self.unique_did, self.nonnull_did);

let ptr_local = self.patch.new_temp(ptr_ty, source_info.span);
self.local_decls.push(LocalDecl::new(ptr_ty, source_info.span));

self.patch.add_statement(location, StatementKind::StorageLive(ptr_local));

Expand Down Expand Up @@ -125,13 +124,6 @@ impl<'tcx> MirPass<'tcx> for ElaborateBoxDerefs {
index += 1;
}

if let Some(terminator) = terminator
&& !matches!(terminator.kind, TerminatorKind::Yield{..})
{
let location = Location { block, statement_index: index };
visitor.visit_terminator(terminator, location);
}

let location = Location { block, statement_index: index };
match terminator {
// yielding into a box is handled when lowering generators
Expand Down