Skip to content

Commit

Permalink
rustc: remove unused lifetimes.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Jun 18, 2019
1 parent 1d0cb40 commit 356a37d
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/librustc/dep_graph/dep_node.rs
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/middle/liveness.rs
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/traits/select.rs
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/ty/query/on_disk_cache.rs
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/lib.rs
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_ssa/traits/backend.rs
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions src/librustc_mir/hair/cx/to_ref.rs
Expand Up @@ -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>;
Expand All @@ -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>;
Expand All @@ -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>;
Expand Down
8 changes: 4 additions & 4 deletions src/librustc_mir/hair/pattern/_match.rs
Expand Up @@ -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>>,
Expand Down Expand Up @@ -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>,
Expand Down Expand Up @@ -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>,
Expand Down Expand Up @@ -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]>
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/monomorphize/collector.rs
Expand Up @@ -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>>>>,
Expand Down

0 comments on commit 356a37d

Please sign in to comment.