Aggregation of cosmetic changes made during work on REPL PRs: librustc_mir#64274
Aggregation of cosmetic changes made during work on REPL PRs: librustc_mir#64274alexreg wants to merge 1 commit intorust-lang:masterfrom
Conversation
| /// I'm not sure this is the right approach - @eddyb could you try and | ||
| /// figure this out? | ||
| // | ||
| // FIXME: I'm not sure this is the right approach -- @eddyb, could you try and |
There was a problem hiding this comment.
Keep as doc-comment for same reason as the case in the other PR.
| ProjectionElem::Index(..) | ||
| | ProjectionElem::ConstantIndex { .. } | ||
| | ProjectionElem::Subslice { .. } => { | ||
| ProjectionElem::Index(..) | |
There was a problem hiding this comment.
This is formatting away from the official rustfmt style; can you please remove the styling changes to match arms in the PR (and if there are other ones in the other PR) altogether? It's not clear to me that they are a win; they mostly just introduce more commits in blame and rustfmt will reformat them anyways later.
| @@ -375,17 +376,17 @@ fn do_mir_borrowck<'a, 'tcx>( | |||
| mbcx.errors_buffer.sort_by_key(|diag| diag.span.primary_span()); | |||
|
|
|||
| if !mbcx.disable_error_downgrading && tcx.migrate_borrowck() { | |||
There was a problem hiding this comment.
Aaw... this is going to conflict with my PR in #64221 unless git is clever... oh well; I guess I can rebase.
| Deep, | ||
|
|
||
| /// Access is Deep only when there is a Drop implementation that | ||
| /// Access is deep only when there is a `Drop` implementation that |
There was a problem hiding this comment.
| /// Access is deep only when there is a `Drop` implementation that | |
| /// Access is `Deep` only when there is a `Drop` implementation that |
| debug!("check_if_reassignment_to_immutable_state({:?})", local); | ||
|
|
||
| // Check if any of the initializiations of `local` have happened yet: | ||
| // Check if any of the initializiations of `local` have happened yet. |
There was a problem hiding this comment.
| // Check if any of the initializiations of `local` have happened yet. | |
| // Check if any of the initializiations of `local` have happened yet... |
| } | ||
|
|
||
| /// Computes a place. You should only use this if you intend to write into this | ||
| /// place; for reading, a more efficient alternative is `eval_place_for_read`. |
There was a problem hiding this comment.
The warning here is presumably there for a reason, revert.
| } | ||
|
|
||
| // No dynamic semantics attached to `FakeRead`; MIR | ||
| // No dynamic semantics attached to FakeRead; MIR |
| TerminatorKind::Drop { .. } | | ||
| TerminatorKind::DropAndReplace { .. } => { | ||
| // `Drop` is also a call, but it doesn't return anything so we are good. | ||
| // Drop is also a call, but it doesn't return anything so we are good. |
| block: BasicBlock, | ||
| data: &mut BasicBlockData<'tcx>) { | ||
| // Remove StorageLive and StorageDead statements for remapped locals | ||
| // Remove StorageLive and StorageDead statements for remapped locals. |
There was a problem hiding this comment.
| // Remove StorageLive and StorageDead statements for remapped locals. | |
| // Remove `StorageLive` and `StorageDead` statements for remapped locals. |
| Checker::new(tcx, def_id, body, mode).check_const().1 | ||
| }; | ||
|
|
||
| // In `const` and `static` everything without `StorageDead` |
There was a problem hiding this comment.
Revert the removal of backticks here in this file.
|
Thanks for the PR. Unfortunately, as per our rules set up in #58619, I am closing this PR. |
Factored out from hacking on rustc for work on the REPL.
r? @Centril