Skip to content

Commit 856b427

Browse files
committed
Remove needless lifetimes
1 parent 69e8a77 commit 856b427

File tree

48 files changed

+182
-182
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+182
-182
lines changed

src/librustc/lint/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ pub fn maybe_lint_level_root(tcx: TyCtxt<'_>, id: hir::HirId) -> bool {
765765
attrs.iter().any(|attr| Level::from_symbol(attr.name_or_empty()).is_some())
766766
}
767767

768-
fn lint_levels<'tcx>(tcx: TyCtxt<'tcx>, cnum: CrateNum) -> &'tcx LintLevelMap {
768+
fn lint_levels(tcx: TyCtxt<'_>, cnum: CrateNum) -> &LintLevelMap {
769769
assert_eq!(cnum, LOCAL_CRATE);
770770
let mut builder = LintLevelMapBuilder {
771771
levels: LintLevelSets::builder(tcx.sess),

src/librustc/middle/cstore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub trait CrateStore {
211211
fn crates_untracked(&self) -> Vec<CrateNum>;
212212

213213
// utility functions
214-
fn encode_metadata<'tcx>(&self, tcx: TyCtxt<'tcx>) -> EncodedMetadata;
214+
fn encode_metadata(&self, tcx: TyCtxt<'_>) -> EncodedMetadata;
215215
fn metadata_encoding_version(&self) -> &[u8];
216216
}
217217

src/librustc/middle/dead.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use syntax_pos;
2626
// explored. For example, if it's a live Node::Item that is a
2727
// function, then we should explore its block to check for codes that
2828
// may need to be marked as live.
29-
fn should_explore<'tcx>(tcx: TyCtxt<'tcx>, hir_id: hir::HirId) -> bool {
29+
fn should_explore(tcx: TyCtxt<'_>, hir_id: hir::HirId) -> bool {
3030
match tcx.hir().find(hir_id) {
3131
Some(Node::Item(..)) |
3232
Some(Node::ImplItem(..)) |
@@ -662,7 +662,7 @@ impl Visitor<'tcx> for DeadVisitor<'tcx> {
662662
}
663663
}
664664

665-
pub fn check_crate<'tcx>(tcx: TyCtxt<'tcx>) {
665+
pub fn check_crate(tcx: TyCtxt<'_>) {
666666
let access_levels = &tcx.privacy_access_levels(LOCAL_CRATE);
667667
let krate = tcx.hir().krate();
668668
let live_symbols = find_live(tcx, access_levels, krate);

src/librustc/middle/dependency_format.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub enum Linkage {
8181
Dynamic,
8282
}
8383

84-
pub fn calculate<'tcx>(tcx: TyCtxt<'tcx>) {
84+
pub fn calculate(tcx: TyCtxt<'_>) {
8585
let sess = &tcx.sess;
8686
let fmts = sess.crate_types.borrow().iter().map(|&ty| {
8787
let linkage = calculate_type(tcx, ty);
@@ -92,7 +92,7 @@ pub fn calculate<'tcx>(tcx: TyCtxt<'tcx>) {
9292
sess.dependency_formats.set(fmts);
9393
}
9494

95-
fn calculate_type<'tcx>(tcx: TyCtxt<'tcx>, ty: config::CrateType) -> DependencyList {
95+
fn calculate_type(tcx: TyCtxt<'_>, ty: config::CrateType) -> DependencyList {
9696
let sess = &tcx.sess;
9797

9898
if !sess.opts.output_types.should_codegen() {
@@ -267,7 +267,7 @@ fn add_library(
267267
}
268268
}
269269

270-
fn attempt_static<'tcx>(tcx: TyCtxt<'tcx>) -> Option<DependencyList> {
270+
fn attempt_static(tcx: TyCtxt<'_>) -> Option<DependencyList> {
271271
let sess = &tcx.sess;
272272
let crates = cstore::used_crates(tcx, RequireStatic);
273273
if !crates.iter().by_ref().all(|&(_, ref p)| p.is_some()) {
@@ -324,7 +324,7 @@ fn activate_injected_dep(injected: Option<CrateNum>,
324324

325325
// After the linkage for a crate has been determined we need to verify that
326326
// there's only going to be one allocator in the output.
327-
fn verify_ok<'tcx>(tcx: TyCtxt<'tcx>, list: &[Linkage]) {
327+
fn verify_ok(tcx: TyCtxt<'_>, list: &[Linkage]) {
328328
let sess = &tcx.sess;
329329
if list.len() == 0 {
330330
return

src/librustc/middle/intrinsicck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use syntax_pos::{Span, sym};
1010
use crate::hir::intravisit::{self, Visitor, NestedVisitorMap};
1111
use crate::hir;
1212

13-
fn check_mod_intrinsics<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) {
13+
fn check_mod_intrinsics(tcx: TyCtxt<'_>, module_def_id: DefId) {
1414
tcx.hir().visit_item_likes_in_module(
1515
module_def_id,
1616
&mut ItemVisitor { tcx }.as_deep_visitor()

src/librustc/middle/lib_features.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ impl Visitor<'tcx> for LibFeatureCollector<'tcx> {
142142
}
143143
}
144144

145-
pub fn collect<'tcx>(tcx: TyCtxt<'tcx>) -> LibFeatures {
145+
pub fn collect(tcx: TyCtxt<'_>) -> LibFeatures {
146146
let mut collector = LibFeatureCollector::new(tcx);
147147
intravisit::walk_crate(&mut collector, tcx.hir().krate());
148148
collector.lib_features

src/librustc/middle/liveness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> {
181181
fn visit_arm(&mut self, a: &'tcx hir::Arm) { visit_arm(self, a); }
182182
}
183183

184-
fn check_mod_liveness<'tcx>(tcx: TyCtxt<'tcx>, module_def_id: DefId) {
184+
fn check_mod_liveness(tcx: TyCtxt<'_>, module_def_id: DefId) {
185185
tcx.hir().visit_item_likes_in_module(
186186
module_def_id,
187187
&mut IrMaps::new(tcx, module_def_id).as_deep_visitor(),

src/librustc/middle/reachable.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ fn item_might_be_inlined(tcx: TyCtxt<'tcx>, item: &hir::Item, attrs: CodegenFnAt
4242
}
4343
}
4444

45-
fn method_might_be_inlined<'tcx>(
46-
tcx: TyCtxt<'tcx>,
45+
fn method_might_be_inlined(
46+
tcx: TyCtxt<'_>,
4747
impl_item: &hir::ImplItem,
4848
impl_src: DefId,
4949
) -> bool {
@@ -391,7 +391,7 @@ impl<'a, 'tcx> ItemLikeVisitor<'tcx> for CollectPrivateImplItemsVisitor<'a, 'tcx
391391
#[derive(Clone, HashStable)]
392392
pub struct ReachableSet(pub Lrc<HirIdSet>);
393393

394-
fn reachable_set<'tcx>(tcx: TyCtxt<'tcx>, crate_num: CrateNum) -> ReachableSet {
394+
fn reachable_set(tcx: TyCtxt<'_>, crate_num: CrateNum) -> ReachableSet {
395395
debug_assert!(crate_num == LOCAL_CRATE);
396396

397397
let access_levels = &tcx.privacy_access_levels(LOCAL_CRATE);

src/librustc/middle/region.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ impl<'tcx> Visitor<'tcx> for RegionResolutionVisitor<'tcx> {
14461446
}
14471447
}
14481448

1449-
fn region_scope_tree<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ScopeTree {
1449+
fn region_scope_tree(tcx: TyCtxt<'_>, def_id: DefId) -> &ScopeTree {
14501450
let closure_base_def_id = tcx.closure_base_def_id(def_id);
14511451
if closure_base_def_id != def_id {
14521452
return tcx.region_scope_tree(closure_base_def_id);

src/librustc/middle/resolve_lifetime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ pub fn provide(providers: &mut ty::query::Providers<'_>) {
368368
/// entire crate. You should not read the result of this query
369369
/// directly, but rather use `named_region_map`, `is_late_bound_map`,
370370
/// etc.
371-
fn resolve_lifetimes<'tcx>(tcx: TyCtxt<'tcx>, for_krate: CrateNum) -> &'tcx ResolveLifetimes {
371+
fn resolve_lifetimes(tcx: TyCtxt<'_>, for_krate: CrateNum) -> &ResolveLifetimes {
372372
assert_eq!(for_krate, LOCAL_CRATE);
373373

374374
let named_region_map = krate(tcx);
@@ -395,7 +395,7 @@ fn resolve_lifetimes<'tcx>(tcx: TyCtxt<'tcx>, for_krate: CrateNum) -> &'tcx Reso
395395
tcx.arena.alloc(rl)
396396
}
397397

398-
fn krate<'tcx>(tcx: TyCtxt<'tcx>) -> NamedRegionMap {
398+
fn krate(tcx: TyCtxt<'_>) -> NamedRegionMap {
399399
let krate = tcx.hir().krate();
400400
let mut map = NamedRegionMap {
401401
defs: Default::default(),

0 commit comments

Comments
 (0)