8000 Rollup of 6 pull requests by Centril · Pull Request #70648 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 6 pull requests #70648

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

Closed
wants to merge 39 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
840a576
Move raw string tests into the raw directory
rcoh Mar 28, 2020
4d099e6
Add `-Z dump-mir-dataflow`
ecstatic-morse Mar 28, 2020
edbd7c8
`dump_enabled` takes a `DefId` instead of `MirSource`
ecstatic-morse Mar 28, 2020
c800402
Dump graphviz dataflow results with flag
ecstatic-morse Mar 28, 2020
4d1194c
Ensure output dir for dataflow results exists
ecstatic-morse Mar 28, 2020
629e97a
Improve error messages for raw strings (#60762)
rcoh Mar 28, 2020
c15f86b
Cleanup error messages, improve docstrings
rcoh Mar 29, 2020
82b2989
More raw string tests
rcoh Mar 29, 2020
bceab25
Cleanup match expression
rcoh Mar 29, 2020
20e2190
Clean up redudant conditions and match exprs
rcoh Mar 30, 2020
097e9e5
Add `can_unwind` field to `FnAbi`
wesleywiser Mar 29, 2020
6067315
Ensure LLVM is in the link path for "fulldeps" tests
cuviper Mar 30, 2020
55a5eea
Fix tests to handle debug_assert
rcoh Mar 31, 2020
d45dca3
Use Place directly, it's Copy
spastorino Mar 30, 2020
f026441
Use Place directly on propagate_closure_used_mut_place, it's Copy
spastorino Mar 30, 2020
a67b28a
Use Place directly on borrow_of_local_data, it's Copy
spastorino Mar 30, 2020
32a7618
Use Place directly on remove_never_initialized_mut_locals, it's Copy
spastorino Mar 30, 2020
760bca4
Use Place directly on check_mut_borrowing_layout_constrained_field, i…
spastorino Mar 30, 2020
25528c1
Use Place directly, it's Copy more use cases
spastorino Mar 30, 2020
890b393
Use Place directly, it's Copy even more use cases
spastorino Mar 31, 2020
6a95bf8
Use Place directly on Operand::place and friends, it's Copy
spastorino Mar 31, 2020
f37d2b8
Use Place directly in librustc_mir_build, it's Copy
spastorino Mar 31, 2020
5987b0f
Use Place directly in place_as_reborrow, it's Copy
spastorino Mar 31, 2020
947c1dc
Use Place directly on place_contents_drop_state_cannot_differ, it's Copy
spastorino Mar 31, 2020
017620f
Use Place directly in peek_at, it's Copy
spastorino Mar 31, 2020
afcd7fc
Use Place directly on codegen_drop_terminator, it's Copy
spastorino Mar 31, 2020
5f8a6ed
Use Place directly on make_return_dest, it's Copy
spastorino Mar 31, 2020
1f5338c
Use Place directly in codegen_transmute, it's Copy
spastorino Mar 31, 2020
a865e77
Use Place directly in evaluate_array_len, it's Copy
spastorino Mar 31, 2020
017608f
Use Place directly in codegen_place_to_pointer, it's Copy
spastorino Mar 31, 2020
b46754e
Use Place directly in apply_call_return_effect on framework/tests, it…
spastorino Mar 31, 2020
c7d9d89
Hide `task_context` when lowering body
jonas-schievink Mar 31, 2020
036626f
Address review feedback
wesleywiser Mar 31, 2020
23a7fd4
Rollup merge of #70511 - ecstatic-morse:mir-dataflow-graphviz, r=davi…
Centril Apr 1, 2020
88ff077
Rollup merge of #70522 - rcoh:60762-raw-string-errors, r=petrochenkov
Centril Apr 1, 2020
2885607
Rollup merge of #70547 - wesleywiser:extract_can_unwind, r=eddyb
Centril Apr 1, 2020
3d38918
Rollup merge of #70591 - cuviper:fulldeps-library-path, r=Mark-Simula…
Centril Apr 1, 2020
983e8c9
Rollup merge of #70627 - spastorino:use-place-directly-its-copy, r=ol…
Centril Apr 1, 2020
5a0c0b3
Rollup merge of #70640 - jonas-schievink:async-ice, r=cramertj
Centril Apr 1, 2020
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
Use Place directly on propagate_closure_used_mut_place, it's Copy
  • Loading branch information
spastorino committed Mar 31, 2020
commit f026441e322277fc2cdd9360598c62966293ff1c
7 changes: 3 additions & 4 deletions src/librustc_mir/borrow_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1282,7 +1282,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
}

fn propagate_closure_used_mut_upvar(&mut self, operand: &Operand<'tcx>) {
let propagate_closure_used_mut_place = |this: &mut Self, place: &Place<'tcx>| {
let propagate_closure_used_mut_place = |this: &mut Self, place: Place<'tcx>| {
if !place.projection.is_empty() {
if let Some(field) = this.is_upvar_field_projection(place.as_ref()) {
this.used_mut_upvars.push(field);
Expand All @@ -1296,7 +1296,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
// captures of a closure are copied/moved directly
// when generating MIR.
match *operand {
Operand::Move(ref place) | Operand::Copy(ref place) => {
Operand::Move(place) | Operand::Copy(place) => {
match place.as_local() {
Some(local) if !self.body.local_decls[local].is_user_variable() => {
if self.body.local_decls[local].ty.is_mutable_ptr() {
Expand Down Expand Up @@ -1335,8 +1335,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
let stmt = &bbd.statements[loc.statement_index];
debug!("temporary assigned in: stmt={:?}", stmt);

if let StatementKind::Assign(box (_, Rvalue::Ref(_, _, ref source))) =
stmt.kind
if let StatementKind::Assign(box (_, Rvalue::Ref(_, _, source))) = stmt.kind
{
propagate_closure_used_mut_place(self, source);
} else {
Expand Down
0