Initial fixes on top of type interner commit
This commit is contained in:
parent
a7015fe816
commit
a056a953f0
28 changed files with 171 additions and 134 deletions
|
@ -98,7 +98,9 @@ struct Upvar<'tcx> {
|
|||
by_ref: bool,
|
||||
}
|
||||
|
||||
const DEREF_PROJECTION: &[PlaceElem<'_>; 1] = &[ProjectionElem::Deref];
|
||||
const fn deref_projection<'tcx>() -> &'tcx [PlaceElem<'tcx>; 1] {
|
||||
&[ProjectionElem::Deref]
|
||||
}
|
||||
|
||||
pub fn provide(providers: &mut Providers) {
|
||||
*providers = Providers {
|
||||
|
@ -1443,7 +1445,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_PROJECTION;
|
||||
root_place.projection = deref_projection();
|
||||
(true, true)
|
||||
} else {
|
||||
(false, self.locals_are_invalidated_at_exit)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue