Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholk
rustc: Remove needless lifetimes
This commit is contained in:
commit
d23cb738d2
109 changed files with 266 additions and 320 deletions
|
@ -28,10 +28,10 @@ pub use super::{
|
|||
/// that shows how to do this at `src/test/run-make/obtain-borrowck/`.
|
||||
///
|
||||
/// * Polonius is highly unstable, so expect regular changes in its signature or other details.
|
||||
pub fn get_body_with_borrowck_facts<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
pub fn get_body_with_borrowck_facts(
|
||||
tcx: TyCtxt<'_>,
|
||||
def: ty::WithOptConstParam<LocalDefId>,
|
||||
) -> BodyWithBorrowckFacts<'tcx> {
|
||||
) -> BodyWithBorrowckFacts<'_> {
|
||||
let (input_body, promoted) = tcx.mir_promoted(def);
|
||||
let infcx = tcx.infer_ctxt().with_opaque_type_inference(DefiningAnchor::Bind(def.did)).build();
|
||||
let input_body: &Body<'_> = &input_body.borrow();
|
||||
|
|
|
@ -9,7 +9,7 @@ use rustc_middle::mir::{Body, Local, Location};
|
|||
/// Find all uses of (including assignments to) a [`Local`].
|
||||
///
|
||||
/// Uses `BTreeSet` so output is deterministic.
|
||||
pub(super) fn find<'tcx>(body: &Body<'tcx>, local: Local) -> BTreeSet<Location> {
|
||||
pub(super) fn find(body: &Body<'_>, local: Local) -> BTreeSet<Location> {
|
||||
let mut visitor = AllLocalUsesVisitor { for_local: local, uses: BTreeSet::default() };
|
||||
visitor.visit_body(body);
|
||||
visitor.uses
|
||||
|
|
|
@ -124,10 +124,7 @@ pub fn provide(providers: &mut Providers) {
|
|||
};
|
||||
}
|
||||
|
||||
fn mir_borrowck<'tcx>(
|
||||
tcx: TyCtxt<'tcx>,
|
||||
def: ty::WithOptConstParam<LocalDefId>,
|
||||
) -> &'tcx BorrowCheckResult<'tcx> {
|
||||
fn mir_borrowck(tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>) -> &BorrowCheckResult<'_> {
|
||||
let (input_body, promoted) = tcx.mir_promoted(def);
|
||||
debug!("run query mir_borrowck: {}", tcx.def_path_str(def.did.to_def_id()));
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ impl UniversalRegionRelations<'_> {
|
|||
/// outlives `fr` and (b) is not local.
|
||||
///
|
||||
/// (*) If there are multiple competing choices, we return all of them.
|
||||
pub(crate) fn non_local_upper_bounds<'a>(&'a self, fr: RegionVid) -> Vec<RegionVid> {
|
||||
pub(crate) fn non_local_upper_bounds(&self, fr: RegionVid) -> Vec<RegionVid> {
|
||||
debug!("non_local_upper_bound(fr={:?})", fr);
|
||||
let res = self.non_local_bounds(&self.inverse_outlives, fr);
|
||||
assert!(!res.is_empty(), "can't find an upper bound!?");
|
||||
|
@ -148,9 +148,9 @@ impl UniversalRegionRelations<'_> {
|
|||
/// Helper for `non_local_upper_bounds` and `non_local_lower_bounds`.
|
||||
/// Repeatedly invokes `postdom_parent` until we find something that is not
|
||||
/// local. Returns `None` if we never do so.
|
||||
fn non_local_bounds<'a>(
|
||||
fn non_local_bounds(
|
||||
&self,
|
||||
relation: &'a TransitiveRelation<RegionVid>,
|
||||
relation: &TransitiveRelation<RegionVid>,
|
||||
fr0: RegionVid,
|
||||
) -> Vec<RegionVid> {
|
||||
// This method assumes that `fr0` is one of the universally
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue