Skip to content
Permalink
Browse files

rustc: remove unused lifetimes.

  • Loading branch information...
eddyb committed Jun 16, 2019
1 parent 1d0cb40 commit 356a37d8d1e9c62481970c36ef45fe7f4f936549
@@ -204,7 +204,7 @@ macro_rules! define_dep_nodes {
impl DepNode {
#[allow(unreachable_code, non_snake_case)]
#[inline(always)]
pub fn new<'a, 'tcx>(tcx: TyCtxt<'tcx>,
pub fn new<'tcx>(tcx: TyCtxt<'tcx>,
dep: DepConstructor<'tcx>)
-> DepNode
{
@@ -352,7 +352,7 @@ impl IrMaps<'tcx> {
}
}

fn visit_fn<'a, 'tcx>(
fn visit_fn<'tcx>(
ir: &mut IrMaps<'tcx>,
fk: FnKind<'tcx>,
decl: &'tcx hir::FnDecl,
@@ -690,7 +690,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
/// Evaluates the predicates in `predicates` recursively. Note that
/// this applies projections in the predicates, and therefore
/// is run within an inference probe.
fn evaluate_predicates_recursively<'a, 'o, I>(
fn evaluate_predicates_recursively<'o, I>(
&mut self,
stack: TraitObligationStackList<'o, 'tcx>,
predicates: I,
@@ -505,7 +505,7 @@ impl<'a, 'tcx> DecoderWithPosition for CacheDecoder<'a, 'tcx> {

// Decode something that was encoded with encode_tagged() and verify that the
// tag matches and the correct amount of bytes was read.
fn decode_tagged<'a, 'tcx, D, T, V>(decoder: &mut D,
fn decode_tagged<D, T, V>(decoder: &mut D,
expected_tag: T)
-> Result<V, D::Error>
where T: Decodable + Eq + ::std::fmt::Debug,
@@ -125,7 +125,7 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
) {
unsafe { allocator::codegen(tcx, mods, kind) }
}
fn compile_codegen_unit<'a, 'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString) {
fn compile_codegen_unit<'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString) {
base::compile_codegen_unit(tcx, cgu_name);
}
fn target_machine_factory(
@@ -44,7 +44,7 @@ pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Se
mods: &mut Self::Module,
kind: AllocatorKind,
);
fn compile_codegen_unit<'a, 'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString);
fn compile_codegen_unit<'tcx>(&self, tcx: TyCtxt<'tcx>, cgu_name: InternedString);
// If find_features is true this won't access `sess.crate_types` by assuming
// that `is_pie_binary` is false. When we discover LLVM target features
// `sess.crate_types` is uninitialized so we cannot access it.
@@ -8,31 +8,31 @@ pub trait ToRef {
fn to_ref(self) -> Self::Output;
}

impl<'a, 'tcx> ToRef for &'tcx hir::Expr {
impl<'tcx> ToRef for &'tcx hir::Expr {
type Output = ExprRef<'tcx>;

fn to_ref(self) -> ExprRef<'tcx> {
ExprRef::Hair(self)
}
}

impl<'a, 'tcx> ToRef for &'tcx P<hir::Expr> {
impl<'tcx> ToRef for &'tcx P<hir::Expr> {
type Output = ExprRef<'tcx>;

fn to_ref(self) -> ExprRef<'tcx> {
ExprRef::Hair(&**self)
}
}

impl<'a, 'tcx> ToRef for Expr<'tcx> {
impl<'tcx> ToRef for Expr<'tcx> {
type Output = ExprRef<'tcx>;

fn to_ref(self) -> ExprRef<'tcx> {
ExprRef::Mirror(Box::new(self))
}
}

impl<'a, 'tcx, T, U> ToRef for &'tcx Option<T>
impl<'tcx, T, U> ToRef for &'tcx Option<T>
where &'tcx T: ToRef<Output = U>
{
type Output = Option<U>;
@@ -42,7 +42,7 @@ impl<'a, 'tcx, T, U> ToRef for &'tcx Option<T>
}
}

impl<'a, 'tcx, T, U> ToRef for &'tcx Vec<T>
impl<'tcx, T, U> ToRef for &'tcx Vec<T>
where &'tcx T: ToRef<Output = U>
{
type Output = Vec<U>;
@@ -52,7 +52,7 @@ impl<'a, 'tcx, T, U> ToRef for &'tcx Vec<T>
}
}

impl<'a, 'tcx, T, U> ToRef for &'tcx P<[T]>
impl<'tcx, T, U> ToRef for &'tcx P<[T]>
where &'tcx T: ToRef<Output = U>
{
type Output = Vec<U>;
@@ -983,7 +983,7 @@ enum MissingCtors<'tcx> {
// (The split logic gives a performance win, because we always need to know if
// the set is empty, but we rarely need the full set, and it can be expensive
// to compute the full set.)
fn compute_missing_ctors<'a, 'tcx>(
fn compute_missing_ctors<'tcx>(
info: MissingCtorsInfo,
tcx: TyCtxt<'tcx>,
all_ctors: &Vec<Constructor<'tcx>>,
@@ -1518,7 +1518,7 @@ fn should_treat_range_exhaustively(tcx: TyCtxt<'tcx>, ctor: &Constructor<'tcx>)
/// boundaries for each interval range, sort them, then create constructors for each new interval
/// between every pair of boundary points. (This essentially sums up to performing the intuitive
/// merging operation depicted above.)
fn split_grouped_constructors<'p, 'a, 'tcx>(
fn split_grouped_constructors<'p, 'tcx>(
tcx: TyCtxt<'tcx>,
ctors: Vec<Constructor<'tcx>>,
&Matrix(ref m): &Matrix<'p, 'tcx>,
@@ -1596,7 +1596,7 @@ fn split_grouped_constructors<'p, 'a, 'tcx>(
}

/// Checks whether there exists any shared value in either `ctor` or `pat` by intersecting them.
fn constructor_intersects_pattern<'p, 'a, 'tcx>(
fn constructor_intersects_pattern<'p, 'tcx>(
tcx: TyCtxt<'tcx>,
ctor: &Constructor<'tcx>,
pat: &'p Pattern<'tcx>,
@@ -1686,7 +1686,7 @@ fn constructor_covered_by_range<'tcx>(
}
}

fn patterns_for_variant<'p, 'a, 'tcx>(
fn patterns_for_variant<'p, 'tcx>(
subpatterns: &'p [FieldPattern<'tcx>],
wild_patterns: &[&'p Pattern<'tcx>])
-> SmallVec<[&'p Pattern<'tcx>; 2]>
@@ -345,7 +345,7 @@ fn collect_roots<'tcx>(tcx: TyCtxt<'tcx>, mode: MonoItemCollectionMode) -> Vec<M
}

// Collect all monomorphized items reachable from `starting_point`
fn collect_items_rec<'a, 'tcx>(
fn collect_items_rec<'tcx>(
tcx: TyCtxt<'tcx>,
starting_point: MonoItem<'tcx>,
visited: MTRef<'_, MTLock<FxHashSet<MonoItem<'tcx>>>>,

0 comments on commit 356a37d

Please sign in to comment.
You can’t perform that action at this time.