rustc: remove unused lifetimes.

This commit is contained in:
Eduard-Mihai Burtescu 2019-06-16 12:33:21 +03:00
parent 1d0cb40908
commit 356a37d8d1
9 changed files with 17 additions and 17 deletions

View File

@ -204,7 +204,7 @@ pub struct DepNode {
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
{

View File

@ -352,7 +352,7 @@ fn lnk(&self, ln: LiveNode) -> LiveNodeKind {
}
}
fn visit_fn<'a, 'tcx>(
fn visit_fn<'tcx>(
ir: &mut IrMaps<'tcx>,
fk: FnKind<'tcx>,
decl: &'tcx hir::FnDecl,

View File

@ -690,7 +690,7 @@ fn evaluation_probe(
/// 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,

View File

@ -505,7 +505,7 @@ fn position(&self) -> usize {
// 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,

View File

@ -125,7 +125,7 @@ fn codegen_allocator<'tcx>(
) {
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(

View File

@ -44,7 +44,7 @@ fn codegen_allocator<'tcx>(
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.

View File

@ -8,7 +8,7 @@ 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> {
@ -16,7 +16,7 @@ fn to_ref(self) -> ExprRef<'tcx> {
}
}
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> {
@ -24,7 +24,7 @@ fn to_ref(self) -> ExprRef<'tcx> {
}
}
impl<'a, 'tcx> ToRef for Expr<'tcx> {
impl<'tcx> ToRef for Expr<'tcx> {
type Output = ExprRef<'tcx>;
fn to_ref(self) -> ExprRef<'tcx> {
@ -32,7 +32,7 @@ fn to_ref(self) -> ExprRef<'tcx> {
}
}
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 @@ fn to_ref(self) -> Option<U> {
}
}
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 @@ fn to_ref(self) -> Vec<U> {
}
}
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>;

View File

@ -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 range_borders(r: IntRange<'_>) -> impl Iterator<Item = Border> {
}
/// 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 @@ macro_rules! some_or_ok {
}
}
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]>

View File

@ -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>>>>,