diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-06-16 12:33:21 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2019-06-18 18:10:26 +0300 |
| commit | 356a37d8d1e9c62481970c36ef45fe7f4f936549 (patch) | |
| tree | 75bb466932d2f3bae0a5657b0bf42bd378ff19c0 | |
| parent | 1d0cb40908534beb9eb2b181f0210043e91caae4 (diff) | |
| download | rust-356a37d8d1e9c62481970c36ef45fe7f4f936549.tar.gz rust-356a37d8d1e9c62481970c36ef45fe7f4f936549.zip | |
rustc: remove unused lifetimes.
| -rw-r--r-- | src/librustc/dep_graph/dep_node.rs | 2 | ||||
| -rw-r--r-- | src/librustc/middle/liveness.rs | 2 | ||||
| -rw-r--r-- | src/librustc/traits/select.rs | 2 | ||||
| -rw-r--r-- | src/librustc/ty/query/on_disk_cache.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_llvm/lib.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/traits/backend.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/hair/cx/to_ref.rs | 12 | ||||
| -rw-r--r-- | src/librustc_mir/hair/pattern/_match.rs | 8 | ||||
| -rw-r--r-- | src/librustc_mir/monomorphize/collector.rs | 2 |
9 files changed, 17 insertions, 17 deletions
diff --git a/src/librustc/dep_graph/dep_node.rs b/src/librustc/dep_graph/dep_node.rs index 2de52e0cfc5..82b0e50b50c 100644 --- a/src/librustc/dep_graph/dep_node.rs +++ b/src/librustc/dep_graph/dep_node.rs @@ -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 { diff --git a/src/librustc/middle/liveness.rs b/src/librustc/middle/liveness.rs index 36411f81f1a..dc6fa066071 100644 --- a/src/librustc/middle/liveness.rs +++ b/src/librustc/middle/liveness.rs @@ -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, diff --git a/src/librustc/traits/select.rs b/src/librustc/traits/select.rs index 0e22db2b9f1..645b6f418dc 100644 --- a/src/librustc/traits/select.rs +++ b/src/librustc/traits/select.rs @@ -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, diff --git a/src/librustc/ty/query/on_disk_cache.rs b/src/librustc/ty/query/on_disk_cache.rs index 1684dac490f..5349b7dbda5 100644 --- a/src/librustc/ty/query/on_disk_cache.rs +++ b/src/librustc/ty/query/on_disk_cache.rs @@ -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, diff --git a/src/librustc_codegen_llvm/lib.rs b/src/librustc_codegen_llvm/lib.rs index a8a998a4d95..1eb6e9a5283 100644 --- a/src/librustc_codegen_llvm/lib.rs +++ b/src/librustc_codegen_llvm/lib.rs @@ -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( diff --git a/src/librustc_codegen_ssa/traits/backend.rs b/src/librustc_codegen_ssa/traits/backend.rs index f2edff2faac..414871be611 100644 --- a/src/librustc_codegen_ssa/traits/backend.rs +++ b/src/librustc_codegen_ssa/traits/backend.rs @@ -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. diff --git a/src/librustc_mir/hair/cx/to_ref.rs b/src/librustc_mir/hair/cx/to_ref.rs index d044b1faedf..2daa8e3cb70 100644 --- a/src/librustc_mir/hair/cx/to_ref.rs +++ b/src/librustc_mir/hair/cx/to_ref.rs @@ -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 @@ impl<'a, 'tcx> ToRef for &'tcx hir::Expr { } } -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 @@ impl<'a, 'tcx> ToRef for &'tcx P<hir::Expr> { } } -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 @@ impl<'a, 'tcx> ToRef for Expr<'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 @@ 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>; diff --git a/src/librustc_mir/hair/pattern/_match.rs b/src/librustc_mir/hair/pattern/_match.rs index 84e23734be0..e4cff5861ca 100644 --- a/src/librustc_mir/hair/pattern/_match.rs +++ b/src/librustc_mir/hair/pattern/_match.rs @@ -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]> diff --git a/src/librustc_mir/monomorphize/collector.rs b/src/librustc_mir/monomorphize/collector.rs index 6dcb23da321..acc786050a8 100644 --- a/src/librustc_mir/monomorphize/collector.rs +++ b/src/librustc_mir/monomorphize/collector.rs @@ -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>>>>, |
