1
Fork 0

Auto merge of #108250 - nnethercote:rename-interner-funcs, r=compiler-errors

Rename interner funcs

This PR cleans up some inconsistencies in interner naming.

Best reviewed one commit at a time.

r? `@compiler-errors`
This commit is contained in:
bors 2023-02-25 13:55:26 +00:00
commit dcca6a375b
111 changed files with 448 additions and 469 deletions

View file

@ -126,7 +126,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
BorrowedContent {
target_place: Place {
local: place.local,
projection: tcx.intern_place_elems(proj),
projection: tcx.mk_place_elems(proj),
},
},
));
@ -165,7 +165,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
if union_path.is_none() {
base = self.add_move_path(base, elem, |tcx| Place {
local: place.local,
projection: tcx.intern_place_elems(&place.projection[..i + 1]),
projection: tcx.mk_place_elems(&place.projection[..i + 1]),
});
}
}
@ -476,7 +476,7 @@ impl<'b, 'a, 'tcx> Gatherer<'b, 'a, 'tcx> {
// `ConstIndex` patterns. This is done to ensure that all move paths
// are disjoint, which is expected by drop elaboration.
let base_place =
Place { local: place.local, projection: self.builder.tcx.intern_place_elems(base) };
Place { local: place.local, projection: self.builder.tcx.mk_place_elems(base) };
let base_path = match self.move_path_for(base_place) {
Ok(path) => path,
Err(MoveError::UnionMove { path }) => {