Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3f2a1c9
Use `OutputFilenames` to generate output file for `-Zllvm-time-trace`
tmiasko Dec 13, 2021
7f2f9c6
Iterator::cycle() — document empty iterator special case
xkr47 Dec 13, 2021
715c562
[ReviewFix] Linguistics
xkr47 Dec 13, 2021
7227a87
When `.await` is called on a non-`Future` expression, suggest removal
estebank Nov 16, 2021
75b6275
Reduce verbosity when calling `for`-loop on non-`Iterator` expression
estebank Nov 16, 2021
caf0c1b
Reduce verbosity for `?` on non-`Try` expressions
estebank Nov 16, 2021
81a3b90
Further silence `?` errors
estebank Nov 16, 2021
79749d6
Remove yet more output from `for`-loop and `?` errors
estebank Nov 16, 2021
4f2b1c0
Remove unnecessary argument
estebank Nov 16, 2021
d45e030
Fix mistake
estebank Nov 16, 2021
f640438
Keep info on pre-desugaring expression for better "incorrect `.await`…
estebank Nov 16, 2021
8888d0d
Fix clippy uses of QPath::LangItem
estebank Nov 16, 2021
b825b0f
Fix rebase and clippy tests
estebank Nov 16, 2021
9ecb141
tidy fix
estebank Nov 16, 2021
d59f74a
Simplify diagnostic logic
estebank Nov 17, 2021
64dea33
review comments
estebank Dec 2, 2021
1a7f2d5
review comment: change wording of suggestion
estebank Dec 10, 2021
64f88e8
fix clippy tests
estebank Dec 10, 2021
f2fc84f
fix coverage report test
estebank Dec 13, 2021
3011154
Revert "Set MACOSX_DEPLOYMENT_TARGET env var to default for linking i…
hkratz Dec 13, 2021
ae21dd0
Remove in_band_lifetimes
Patrick-Poitras Dec 14, 2021
a586e7d
Make suggestions from @jackh726; run fmt
Patrick-Poitras Dec 14, 2021
304ede6
Stabilize iter::zip.
Patrick-Poitras Dec 13, 2021
047adb5
Remove iter::zip feature gate from clippy
Patrick-Poitras Dec 14, 2021
d9dd360
Update cargo
ehuss Dec 14, 2021
272188e
Rollup merge of #90939 - estebank:wg-af-polish, r=tmandry
matthiaskrgr Dec 15, 2021
d6c802e
Rollup merge of #91859 - xkr47:patch-2, r=yaahc
matthiaskrgr Dec 15, 2021
ccfc22b
Rollup merge of #91868 - tmiasko:llvm-time-trace-out, r=oli-obk
matthiaskrgr Dec 15, 2021
2f270e4
Rollup merge of #91870 - rusticstuff:macosx_min_version_revert, r=Mar…
matthiaskrgr Dec 15, 2021
4e7497b
Rollup merge of #91881 - Patrick-Poitras:stabilize-iter-zip, r=scottmcm
matthiaskrgr Dec 15, 2021
6abad4c
Rollup merge of #91882 - Patrick-Poitras:remove-in-band-lifetimes-fro…
matthiaskrgr Dec 15, 2021
22fc403
Rollup merge of #91940 - ehuss:update-cargo, r=ehuss
matthiaskrgr Dec 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove in_band_lifetimes
  • Loading branch information
Patrick-Poitras committed Dec 14, 2021
commit ae21dd00ace34974a8337195c885c250f402d8cf
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/astconv/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
&self,
span: Span,
trait_def_id: DefId,
trait_segment: &'a hir::PathSegment<'a>,
trait_segment: &'_ hir::PathSegment<'_>,
) {
let trait_def = self.tcx().trait_def(trait_def_id);

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/_match.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}
}

fn arms_contain_ref_bindings(arms: &'tcx [hir::Arm<'tcx>]) -> Option<hir::Mutability> {
fn arms_contain_ref_bindings<'tcx>(arms: &'tcx [hir::Arm<'tcx>]) -> Option<hir::Mutability> {
arms.iter().filter_map(|a| a.pat.contains_explicit_ref_binding()).max_by_key(|m| match *m {
hir::Mutability::Mut => 1,
hir::Mutability::Not => 0,
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_typeck/src/check/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ pub(super) fn check_opaque<'tcx>(
/// Checks that an opaque type does not use `Self` or `T::Foo` projections that would result
/// in "inheriting lifetimes".
#[instrument(level = "debug", skip(tcx, span))]
pub(super) fn check_opaque_for_inheriting_lifetimes(
pub(super) fn check_opaque_for_inheriting_lifetimes<'tcx>(
tcx: TyCtxt<'tcx>,
def_id: LocalDefId,
span: Span,
Expand Down Expand Up @@ -517,7 +517,7 @@ pub(super) fn check_opaque_for_inheriting_lifetimes(
}
}

impl Visitor<'tcx> for ProhibitOpaqueVisitor<'tcx> {
impl<'tcx> Visitor<'tcx> for ProhibitOpaqueVisitor<'tcx> {
type Map = rustc_middle::hir::map::Map<'tcx>;

fn nested_visit_map(&mut self) -> hir::intravisit::NestedVisitorMap<Self::Map> {
Expand Down Expand Up @@ -1512,7 +1512,7 @@ pub(super) use wfcheck::check_trait_item as check_trait_item_well_formed;

pub(super) use wfcheck::check_impl_item as check_impl_item_well_formed;

fn async_opaque_type_cycle_error(tcx: TyCtxt<'tcx>, span: Span) {
fn async_opaque_type_cycle_error(tcx: TyCtxt<'_>, span: Span) {
struct_span_err!(tcx.sess, span, E0733, "recursion in an `async fn` requires boxing")
.span_label(span, "recursive `async fn`")
.note("a recursive `async fn` must be rewritten to return a boxed `dyn Future`")
Expand All @@ -1530,7 +1530,7 @@ fn async_opaque_type_cycle_error(tcx: TyCtxt<'tcx>, span: Span) {
///
/// If all the return expressions evaluate to `!`, then we explain that the error will go away
/// after changing it. This can happen when a user uses `panic!()` or similar as a placeholder.
fn opaque_type_cycle_error(tcx: TyCtxt<'tcx>, def_id: LocalDefId, span: Span) {
fn opaque_type_cycle_error(tcx: TyCtxt<'_>, def_id: LocalDefId, span: Span) {
let mut err = struct_span_err!(tcx.sess, span, E0720, "cannot resolve opaque type");

let mut label = false;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/check/coercion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ fn identity(_: Ty<'_>) -> Vec<Adjustment<'_>> {
vec![]
}

fn simple(kind: Adjust<'tcx>) -> impl FnOnce(Ty<'tcx>) -> Vec<Adjustment<'tcx>> {
fn simple<'tcx>(kind: Adjust<'tcx>) -> impl FnOnce(Ty<'tcx>) -> Vec<Adjustment<'tcx>> {
move |target| vec![Adjustment { kind, target }]
}

Expand Down Expand Up @@ -1694,7 +1694,7 @@ impl<'tcx, 'exprs, E: AsCoercionSite> CoerceMany<'tcx, 'exprs, E> {
err.help("you could instead create a new `enum` with a variant for each returned type");
}

fn is_return_ty_unsized(&self, fcx: &FnCtxt<'a, 'tcx>, blk_id: hir::HirId) -> bool {
fn is_return_ty_unsized<'a>(&self, fcx: &FnCtxt<'a, 'tcx>, blk_id: hir::HirId) -> bool {
if let Some((fn_decl, _)) = fcx.get_fn_decl(blk_id) {
if let hir::FnRetTy::Return(ty) = fn_decl.output {
let ty = <dyn AstConv<'_>>::ast_ty_to_ty(fcx, ty);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/dropck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ impl<'tcx> SimpleEqRelation<'tcx> {
}
}

impl TypeRelation<'tcx> for SimpleEqRelation<'tcx> {
impl<'tcx> TypeRelation<'tcx> for SimpleEqRelation<'tcx> {
fn tcx(&self) -> TyCtxt<'tcx> {
self.tcx
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/check/inherited.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub struct InheritedBuilder<'tcx> {
def_id: LocalDefId,
}

impl Inherited<'_, 'tcx> {
impl<'tcx> Inherited<'_, 'tcx> {
pub fn build(tcx: TyCtxt<'tcx>, def_id: LocalDefId) -> InheritedBuilder<'tcx> {
let hir_owner = tcx.hir().local_def_id_to_hir_id(def_id).owner;

Expand All @@ -97,7 +97,7 @@ impl<'tcx> InheritedBuilder<'tcx> {
}
}

impl Inherited<'a, 'tcx> {
impl<'a, 'tcx> Inherited<'a, 'tcx> {
pub(super) fn new(infcx: InferCtxt<'a, 'tcx>, def_id: LocalDefId) -> Self {
let tcx = infcx.tcx;
let item_id = tcx.hir().local_def_id_to_hir_id(def_id);
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/check/method/suggest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1968,7 +1968,7 @@ fn find_use_placement<'tcx>(tcx: TyCtxt<'tcx>, target_module: LocalDefId) -> (Op
(span, found_use)
}

fn print_disambiguation_help(
fn print_disambiguation_help<'tcx>(
item_name: Ident,
args: Option<&'tcx [hir::Expr<'tcx>]>,
err: &mut DiagnosticBuilder<'_>,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ struct GeneratorTypes<'tcx> {

/// Given a `DefId` for an opaque type in return position, find its parent item's return
/// expressions.
fn get_owner_return_paths(
fn get_owner_return_paths<'tcx>(
tcx: TyCtxt<'tcx>,
def_id: LocalDefId,
) -> Option<(hir::HirId, ReturnsVisitor<'tcx>)> {
Expand Down Expand Up @@ -906,7 +906,7 @@ struct CheckItemTypesVisitor<'tcx> {
tcx: TyCtxt<'tcx>,
}

impl ItemLikeVisitor<'tcx> for CheckItemTypesVisitor<'tcx> {
impl<'tcx> ItemLikeVisitor<'tcx> for CheckItemTypesVisitor<'tcx> {
fn visit_item(&mut self, i: &'tcx hir::Item<'tcx>) {
check_item_type(self.tcx, i);
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/check/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ enum Op {
}

/// Dereferences a single level of immutable referencing.
fn deref_ty_if_possible(ty: Ty<'tcx>) -> Ty<'tcx> {
fn deref_ty_if_possible<'tcx>(ty: Ty<'tcx>) -> Ty<'tcx> {
match ty.kind() {
ty::Ref(_, ty, hir::Mutability::Not) => ty,
_ => ty,
Expand Down Expand Up @@ -1007,7 +1007,7 @@ impl<'tcx> TypeVisitor<'tcx> for TypeParamVisitor<'tcx> {

struct TypeParamEraser<'a, 'tcx>(&'a FnCtxt<'a, 'tcx>, Span);

impl TypeFolder<'tcx> for TypeParamEraser<'_, 'tcx> {
impl<'tcx> TypeFolder<'tcx> for TypeParamEraser<'_, 'tcx> {
fn tcx(&self) -> TyCtxt<'tcx> {
self.0.tcx
}
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/check/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
}
}

fn check_pat_path(
fn check_pat_path<'b>(
&self,
pat: &Pat<'_>,
path_resolution: (Res, Option<Ty<'tcx>>, &'b [hir::PathSegment<'b>]),
Expand Down Expand Up @@ -816,7 +816,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
false
}

fn emit_bad_pat_path(
fn emit_bad_pat_path<'b>(
&self,
mut e: DiagnosticBuilder<'_>,
pat_span: Span,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/check/regionck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ macro_rules! ignore_err {
pub(crate) trait OutlivesEnvironmentExt<'tcx> {
fn add_implied_bounds(
&mut self,
infcx: &InferCtxt<'a, 'tcx>,
infcx: &InferCtxt<'_, 'tcx>,
fn_sig_tys: FxHashSet<Ty<'tcx>>,
body_id: hir::HirId,
span: Span,
Expand All @@ -130,7 +130,7 @@ impl<'tcx> OutlivesEnvironmentExt<'tcx> for OutlivesEnvironment<'tcx> {
/// add those assumptions into the outlives-environment.
///
/// Tests: `src/test/ui/regions/regions-free-region-ordering-*.rs`
fn add_implied_bounds(
fn add_implied_bounds<'a>(
&mut self,
infcx: &InferCtxt<'a, 'tcx>,
fn_sig_tys: FxHashSet<Ty<'tcx>>,
Expand Down
20 changes: 10 additions & 10 deletions compiler/rustc_typeck/src/check/upvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1672,7 +1672,7 @@ fn restrict_repr_packed_field_ref_capture<'tcx>(
}

/// Returns a Ty that applies the specified capture kind on the provided capture Ty
fn apply_capture_kind_on_capture_ty(
fn apply_capture_kind_on_capture_ty<'tcx>(
tcx: TyCtxt<'tcx>,
ty: Ty<'tcx>,
capture_kind: UpvarCapture<'tcx>,
Expand All @@ -1685,7 +1685,7 @@ fn apply_capture_kind_on_capture_ty(
}

/// Returns the Span of where the value with the provided HirId would be dropped
fn drop_location_span(tcx: TyCtxt<'tcx>, hir_id: &hir::HirId) -> Span {
fn drop_location_span<'tcx>(tcx: TyCtxt<'tcx>, hir_id: &hir::HirId) -> Span {
let owner_id = tcx.hir().get_enclosing_scope(*hir_id).unwrap();

let owner_node = tcx.hir().get(owner_id);
Expand Down Expand Up @@ -1999,7 +1999,7 @@ fn restrict_precision_for_drop_types<'a, 'tcx>(
/// - No projections are applied to raw pointers, since these require unsafe blocks. We capture
/// them completely.
/// - No projections are applied on top of Union ADTs, since these require unsafe blocks.
fn restrict_precision_for_unsafe(
fn restrict_precision_for_unsafe<'tcx>(
mut place: Place<'tcx>,
mut curr_mode: ty::UpvarCapture<'tcx>,
) -> (Place<'tcx>, ty::UpvarCapture<'tcx>) {
Expand Down Expand Up @@ -2097,7 +2097,7 @@ fn adjust_for_non_move_closure<'tcx>(
(place, kind)
}

fn construct_place_string(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
fn construct_place_string<'tcx>(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
let variable_name = match place.base {
PlaceBase::Upvar(upvar_id) => var_name(tcx, upvar_id.var_path.hir_id).to_string(),
_ => bug!("Capture_information should only contain upvars"),
Expand All @@ -2120,7 +2120,7 @@ fn construct_place_string(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
format!("{}[{}]", variable_name, projections_str)
}

fn construct_capture_kind_reason_string(
fn construct_capture_kind_reason_string<'tcx>(
tcx: TyCtxt<'_>,
place: &Place<'tcx>,
capture_info: &ty::CaptureInfo<'tcx>,
Expand All @@ -2135,13 +2135,13 @@ fn construct_capture_kind_reason_string(
format!("{} captured as {} here", place_str, capture_kind_str)
}

fn construct_path_string(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
fn construct_path_string<'tcx>(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String {
let place_str = construct_place_string(tcx, place);

format!("{} used here", place_str)
}

fn construct_capture_info_string(
fn construct_capture_info_string<'tcx>(
tcx: TyCtxt<'_>,
place: &Place<'tcx>,
capture_info: &ty::CaptureInfo<'tcx>,
Expand Down Expand Up @@ -2233,7 +2233,7 @@ fn migration_suggestion_for_2229(
/// would've already handled `E1`, and have an existing capture_information for it.
/// Calling `determine_capture_info(existing_info_e1, current_info_e2)` will return
/// `existing_info_e1` in this case, allowing us to point to `E1` in case of diagnostics.
fn determine_capture_info(
fn determine_capture_info<'tcx>(
capture_info_a: ty::CaptureInfo<'tcx>,
capture_info_b: ty::CaptureInfo<'tcx>,
) -> ty::CaptureInfo<'tcx> {
Expand Down Expand Up @@ -2292,7 +2292,7 @@ fn determine_capture_info(
///
/// Note: Capture kind changes from `MutBorrow` to `UniqueImmBorrow` if the truncated part of the `place`
/// contained `Deref` of `&mut`.
fn truncate_place_to_len_and_update_capture_kind(
fn truncate_place_to_len_and_update_capture_kind<'tcx>(
place: &mut Place<'tcx>,
curr_mode: &mut ty::UpvarCapture<'tcx>,
len: usize,
Expand Down Expand Up @@ -2330,7 +2330,7 @@ fn truncate_place_to_len_and_update_capture_kind(
/// `PlaceAncestryRelation::Ancestor` implies Place A is ancestor of Place B
/// `PlaceAncestryRelation::Descendant` implies Place A is descendant of Place B
/// `PlaceAncestryRelation::Divergent` implies neither of them is the ancestor of the other.
fn determine_place_ancestry_relation(
fn determine_place_ancestry_relation<'tcx>(
place_a: &Place<'tcx>,
place_b: &Place<'tcx>,
) -> PlaceAncestryRelation {
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_typeck/src/check/wfcheck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ fn check_method_receiver<'fcx, 'tcx>(
}
}

fn e0307(fcx: &FnCtxt<'fcx, 'tcx>, span: Span, receiver_ty: Ty<'_>) {
fn e0307<'fcx, 'tcx> (fcx: &FnCtxt<'fcx, 'tcx>, span: Span, receiver_ty: Ty<'_>) {
struct_span_err!(
fcx.tcx.sess.diagnostic(),
span,
Expand Down Expand Up @@ -1553,7 +1553,7 @@ fn receiver_is_valid<'fcx, 'tcx>(
true
}

fn receiver_is_implemented(
fn receiver_is_implemented<'tcx>(
fcx: &FnCtxt<'_, 'tcx>,
receiver_trait_def_id: DefId,
cause: ObligationCause<'tcx>,
Expand Down Expand Up @@ -1696,13 +1696,13 @@ pub struct CheckTypeWellFormedVisitor<'tcx> {
tcx: TyCtxt<'tcx>,
}

impl CheckTypeWellFormedVisitor<'tcx> {
pub fn new(tcx: TyCtxt<'tcx>) -> CheckTypeWellFormedVisitor<'tcx> {
impl CheckTypeWellFormedVisitor<'_> {
pub fn new(tcx: TyCtxt<'_>) -> CheckTypeWellFormedVisitor<'_> {
CheckTypeWellFormedVisitor { tcx }
}
}

impl ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
impl<'tcx> ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
fn visit_item(&self, i: &'tcx hir::Item<'tcx>) {
Visitor::visit_item(&mut self.clone(), i);
}
Expand All @@ -1720,7 +1720,7 @@ impl ParItemLikeVisitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
}
}

impl Visitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
impl<'tcx> Visitor<'tcx> for CheckTypeWellFormedVisitor<'tcx> {
type Map = hir_map::Map<'tcx>;

fn nested_visit_map(&mut self) -> hir_visit::NestedVisitorMap<Self::Map> {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/check_unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn check_crate(tcx: TyCtxt<'_>) {
unused_crates_lint(tcx);
}

impl ItemLikeVisitor<'v> for CheckVisitor<'tcx> {
impl <'v, 'tcx> ItemLikeVisitor<'v> for CheckVisitor<'tcx> {
fn visit_item(&mut self, item: &hir::Item<'_>) {
if item.vis.node.is_pub() || item.span.is_dummy() {
return;
Expand All @@ -43,7 +43,7 @@ struct CheckVisitor<'tcx> {
used_trait_imports: FxHashSet<LocalDefId>,
}

impl CheckVisitor<'tcx> {
impl<'tcx> CheckVisitor<'tcx> {
fn check_import(&self, item_id: hir::ItemId, span: Span) {
if !self.tcx.maybe_unused_trait_import(item_id.def_id) {
return;
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/coherence/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ fn visit_implementation_of_copy(tcx: TyCtxt<'_>, impl_did: LocalDefId) {
}
}

fn visit_implementation_of_coerce_unsized(tcx: TyCtxt<'tcx>, impl_did: LocalDefId) {
fn visit_implementation_of_coerce_unsized(tcx: TyCtxt<'_>, impl_did: LocalDefId) {
debug!("visit_implementation_of_coerce_unsized: impl_did={:?}", impl_did);

// Just compute this for the side-effects, in particular reporting
Expand Down Expand Up @@ -287,7 +287,7 @@ fn visit_implementation_of_dispatch_from_dyn(tcx: TyCtxt<'_>, impl_did: LocalDef
})
}

pub fn coerce_unsized_info(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUnsizedInfo {
pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUnsizedInfo {
debug!("compute_coerce_unsized_info(impl_did={:?})", impl_did);

// this provider should only get invoked for local def-ids
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/coherence/inherent_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct InherentCollect<'tcx> {
impls_map: CrateInherentImpls,
}

impl ItemLikeVisitor<'v> for InherentCollect<'tcx> {
impl<'v, 'tcx> ItemLikeVisitor<'v> for InherentCollect<'tcx> {
fn visit_item(&mut self, item: &hir::Item<'_>) {
let (ty, assoc_items) = match item.kind {
hir::ItemKind::Impl(hir::Impl { of_trait: None, ref self_ty, items, .. }) => {
Expand Down Expand Up @@ -370,7 +370,7 @@ impl ItemLikeVisitor<'v> for InherentCollect<'tcx> {
fn visit_foreign_item(&mut self, _foreign_item: &hir::ForeignItem<'_>) {}
}

impl InherentCollect<'tcx> {
impl<'tcx> InherentCollect<'tcx> {
fn check_def_id(&mut self, item: &hir::Item<'_>, def_id: DefId) {
if let Some(def_id) = def_id.as_local() {
// Add the implementation to the mapping from implementation to base
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_typeck/src/coherence/inherent_impls_overlap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct InherentOverlapChecker<'tcx> {
tcx: TyCtxt<'tcx>,
}

impl InherentOverlapChecker<'tcx> {
impl<'tcx> InherentOverlapChecker<'tcx> {
/// Checks whether any associated items in impls 1 and 2 share the same identifier and
/// namespace.
fn impls_have_common_items(
Expand Down Expand Up @@ -115,7 +115,7 @@ impl InherentOverlapChecker<'tcx> {
}
}

impl ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> {
impl<'v, 'tcx> ItemLikeVisitor<'v> for InherentOverlapChecker<'tcx> {
fn visit_item(&mut self, item: &'v hir::Item<'v>) {
match item.kind {
hir::ItemKind::Enum(..)
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_typeck/src/coherence/orphan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ fn orphan_check_impl(tcx: TyCtxt<'_>, def_id: LocalDefId) -> Result<(), ErrorRep
Ok(())
}

fn emit_orphan_check_error(
fn emit_orphan_check_error<'tcx>(
tcx: TyCtxt<'tcx>,
sp: Span,
trait_span: Span,
Expand Down
Loading