Skip to content

Commit 0759a55

Browse files
committed
Remove unnecessary lifetime parameter
TyCtxt is a reference type and so can be passed by value.
1 parent 763d373 commit 0759a55

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/librustdoc/core.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ pub fn run_core(options: RustdocOptions) -> (clean::Crate, RenderInfo, RenderOpt
392392
let hir = tcx.hir();
393393
let body = hir.body(hir.body_owned_by(hir.as_local_hir_id(def_id)));
394394
debug!("visiting body for {:?}", def_id);
395-
EmitIgnoredResolutionErrors::new(&tcx).visit_body(body);
395+
EmitIgnoredResolutionErrors::new(tcx).visit_body(body);
396396
DEFAULT_TYPECK.with(|typeck| typeck(tcx, def_id))
397397
};
398398
}),
@@ -602,17 +602,17 @@ thread_local!(static DEFAULT_TYPECK: for<'tcx> fn(TyCtxt<'tcx>, LocalDefId) -> &
602602
/// the name resolution pass may find errors that are never emitted.
603603
/// If typeck is called after this happens, then we'll get an ICE:
604604
/// 'Res::Error found but not reported'. To avoid this, emit the errors now.
605-
struct EmitIgnoredResolutionErrors<'a, 'tcx> {
606-
tcx: &'a TyCtxt<'tcx>,
605+
struct EmitIgnoredResolutionErrors<'tcx> {
606+
tcx: TyCtxt<'tcx>,
607607
}
608608

609-
impl<'a, 'tcx> EmitIgnoredResolutionErrors<'a, 'tcx> {
610-
fn new(tcx: &'a TyCtxt<'tcx>) -> Self {
609+
impl<'tcx> EmitIgnoredResolutionErrors<'tcx> {
610+
fn new(tcx: TyCtxt<'tcx>) -> Self {
611611
Self { tcx }
612612
}
613613
}
614614

615-
impl<'tcx> Visitor<'tcx> for EmitIgnoredResolutionErrors<'_, 'tcx> {
615+
impl<'tcx> Visitor<'tcx> for EmitIgnoredResolutionErrors<'tcx> {
616616
type Map = Map<'tcx>;
617617

618618
fn nested_visit_map(&mut self) -> NestedVisitorMap<Self::Map> {

0 commit comments

Comments
 (0)