Remove ToRegionVid
.
It is only implemented for `Region`, where it is equivalent to the inherent `as_var` method.
This commit is contained in:
parent
411422f2b9
commit
bbc400993e
11 changed files with 32 additions and 55 deletions
|
@ -1,6 +1,5 @@
|
|||
#![deny(rustc::untranslatable_diagnostic)]
|
||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||
use crate::nll::ToRegionVid;
|
||||
use crate::path_utils::allow_two_phase_borrow;
|
||||
use crate::place_ext::PlaceExt;
|
||||
use crate::BorrowIndex;
|
||||
|
@ -204,7 +203,7 @@ impl<'a, 'tcx> Visitor<'tcx> for GatherBorrows<'a, 'tcx> {
|
|||
return;
|
||||
}
|
||||
|
||||
let region = region.to_region_vid();
|
||||
let region = region.as_var();
|
||||
|
||||
let borrow = BorrowData {
|
||||
kind,
|
||||
|
@ -279,7 +278,7 @@ impl<'a, 'tcx> Visitor<'tcx> for GatherBorrows<'a, 'tcx> {
|
|||
let borrow_data = &self.location_map[&location];
|
||||
assert_eq!(borrow_data.reserve_location, location);
|
||||
assert_eq!(borrow_data.kind, kind);
|
||||
assert_eq!(borrow_data.region, region.to_region_vid());
|
||||
assert_eq!(borrow_data.region, region.as_var());
|
||||
assert_eq!(borrow_data.borrowed_place, place);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue