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 6 pull requests #69856

Closed
wants to merge 36 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1244ced
Remove "important traits" feature
GuillaumeGomez Feb 27, 2020
13c6d58
Remove spotlight usage
GuillaumeGomez Feb 27, 2020
7859f0e
Make PlaceRef lifetimes of Place::as_ref be both 'tcx
spastorino Mar 3, 2020
812e62f
Make PlaceRef lifetimes of LocalAnalyzer::process_place be both 'tcx
spastorino Mar 3, 2020
1a1dcfa
Make PlaceRef lifetimes of codegen_place be both 'tcx
spastorino Mar 3, 2020
2af5e87
Make PlaceRef lifetimes of monomorphized_place_ty be both 'tcx
spastorino Mar 3, 2020
a20d54f
Make PlaceRef lifetimes of RootPlace be both 'tcx
spastorino Mar 3, 2020
842af36
Make PlaceRef lifetimes of borrow_conflict_place be both 'tcx
spastorino Mar 4, 2020
f54e863
Make PlaceRef lifetimes of move_error_reported be both 'tcx
spastorino Mar 4, 2020
6200f5c
Make PlaceRef lifetimes of uninitialized_error_reported be both 'tcx
spastorino Mar 4, 2020
e32ee55
Make PlaceRef lifetimes of move_path_closest_to be both 'tcx
spastorino Mar 4, 2020
634a167
Make PlaceRef lifetimes of move_path_for_place be both 'tcx
spastorino Mar 4, 2020
c6f1244
Make PlaceRef lifetimes of is_upvar_field_projection be both 'tcx
spastorino Mar 4, 2020
6f23650
Make PlaceRef lifetimes of add_moved_or_invoked_closure_note be both …
spastorino Mar 4, 2020
eb67eca
Make PlaceRef lifetimes of describe_field be both 'tcx
spastorino Mar 4, 2020
a30f55f
Make PlaceRef lifetimes of borrowed_content_source be both 'tcx
spastorino Mar 4, 2020
bd4dad4
Make PlaceRef lifetimes of move_spans be both 'tcx
spastorino Mar 4, 2020
46d85e5
Make PlaceRef lifetimes of closure_span be both 'tcx
spastorino Mar 4, 2020
a32afa3
Make PlaceRef lifetimes of classify_drop_access_kind be both 'tcx
spastorino Mar 4, 2020
a5d1e18
Make PlaceRef lifetimes of is_prefix_of be both 'tcx
spastorino Mar 4, 2020
2cb2559
Make PlaceRef lifetimes of in_projection be both 'tcx
spastorino Mar 4, 2020
b11cd0b
PlaceRef<'a, 'tcx> -> PlaceRef<'tcx>
spastorino Mar 4, 2020
c1df945
rustc_metadata: Give decoder access to whole crate store
petrochenkov Mar 2, 2020
41374d7
rustc_metadata: Move some code from `impl CrateMetadataRef` to `impl …
petrochenkov Mar 3, 2020
f77afc8
Allow ZSTs in `AllocRef`
TimDiekmann Mar 7, 2020
d32924f
Check if output is immediate value
JohnTitor Mar 8, 2020
6701215
Move `analysis` to the query macro
Zoxc Feb 25, 2020
cbce217
Remove the need for `no_force`
Zoxc Feb 26, 2020
f445077
Remove the `no_force` query attribute
Zoxc Feb 26, 2020
2f12009
Add a comment to `recover`.
Zoxc Mar 9, 2020
0cbaefc
Rollup merge of #69475 - Zoxc:no-no-force, r=michaelwoerister
Centril Mar 9, 2020
dd6a074
Rollup merge of #69514 - GuillaumeGomez:remove-spotlight, r=kinnison
Centril Mar 9, 2020
522b1d0
Rollup merge of #69677 - petrochenkov:spancode, r=eddyb
Centril Mar 9, 2020
3407442
Rollup merge of #69714 - spastorino:place-ref-lifetime, r=oli-obk
Centril Mar 9, 2020
e3f040f
Rollup merge of #69799 - TimDiekmann:zst, r=Amanieu
Centril Mar 9, 2020
da9d266
Rollup merge of #69836 - JohnTitor:immediate-outputs, r=nagisa
Centril Mar 9, 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
Make PlaceRef lifetimes of borrow_conflict_place be both 'tcx
spastorino committed Mar 4, 2020

Verified

This commit was signed with the committer’s verified signature.
commit 842af362685979e011e0360984dc1ec96ba5b7e9
5 changes: 3 additions & 2 deletions src/librustc_mir/borrow_check/mod.rs
Original file line number Diff line number Diff line change
@@ -86,6 +86,8 @@ crate struct Upvar {
mutability: Mutability,
}

const DEREF_PROJECTION: &[PlaceElem<'_>; 1] = &[ProjectionElem::Deref];

pub fn provide(providers: &mut Providers<'_>) {
*providers = Providers { mir_borrowck, ..*providers };
}
@@ -1413,7 +1415,6 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
) {
debug!("check_for_invalidation_at_exit({:?})", borrow);
let place = &borrow.borrowed_place;
let deref = [ProjectionElem::Deref];
let mut root_place = PlaceRef { local: place.local, projection: &[] };

// FIXME(nll-rfc#40): do more precise destructor tracking here. For now
@@ -1427,7 +1428,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
// Thread-locals might be dropped after the function exits
// We have to dereference the outer reference because
// borrows don't conflict behind shared references.
root_place.projection = &deref;
root_place.projection = DEREF_PROJECTION;
(true, true)
} else {
(false, self.locals_are_invalidated_at_exit)
4 changes: 2 additions & 2 deletions src/librustc_mir/borrow_check/places_conflict.rs
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ pub(super) fn borrow_conflicts_with_place<'tcx>(
body: &Body<'tcx>,
borrow_place: &Place<'tcx>,
borrow_kind: BorrowKind,
access_place: PlaceRef<'_, 'tcx>,
access_place: PlaceRef<'tcx, 'tcx>,
access: AccessDepth,
bias: PlaceConflictBias,
) -> bool {
@@ -73,7 +73,7 @@ fn place_components_conflict<'tcx>(
body: &Body<'tcx>,
borrow_place: &Place<'tcx>,
borrow_kind: BorrowKind,
access_place: PlaceRef<'_, 'tcx>,
access_place: PlaceRef<'tcx, 'tcx>,
access: AccessDepth,
bias: PlaceConflictBias,
) -> bool {