Skip to content

Commit 4bdfb07

Browse files
committed
Auto merge of #10097 - flip1995:rustup, r=flip1995
Rustup r? `@ghost` I'm on the train and my internet is too bad to download the necessary toolchain, so I have to use CI to find sync fallout. changelog: none <!-- changelog_checked -->
2 parents 391b2a6 + 7198989 commit 4bdfb07

38 files changed

+129
-118
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy"
3-
version = "0.1.67"
3+
version = "0.1.68"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

clippy_lints/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "clippy_lints"
3-
version = "0.1.67"
3+
version = "0.1.68"
44
description = "A bunch of helpful lints to avoid common pitfalls in Rust"
55
repository = "https://github.com/rust-lang/rust-clippy"
66
readme = "README.md"

clippy_lints/src/dereference.rs

+11-6
Original file line numberDiff line numberDiff line change
@@ -1244,7 +1244,7 @@ fn is_mixed_projection_predicate<'tcx>(
12441244
let mut projection_ty = projection_predicate.projection_ty;
12451245
loop {
12461246
match projection_ty.self_ty().kind() {
1247-
ty::Projection(inner_projection_ty) => {
1247+
ty::Alias(ty::Projection, inner_projection_ty) => {
12481248
projection_ty = *inner_projection_ty;
12491249
}
12501250
ty::Param(param_ty) => {
@@ -1330,7 +1330,7 @@ fn replace_types<'tcx>(
13301330
&& let Some(term_ty) = projection_predicate.term.ty()
13311331
&& let ty::Param(term_param_ty) = term_ty.kind()
13321332
{
1333-
let item_def_id = projection_predicate.projection_ty.item_def_id;
1333+
let item_def_id = projection_predicate.projection_ty.def_id;
13341334
let assoc_item = cx.tcx.associated_item(item_def_id);
13351335
let projection = cx.tcx
13361336
.mk_projection(assoc_item.def_id, cx.tcx.mk_substs_trait(new_ty, []));
@@ -1390,10 +1390,15 @@ fn ty_auto_deref_stability<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, precedenc
13901390
continue;
13911391
},
13921392
ty::Param(_) => TyPosition::new_deref_stable_for_result(precedence, ty),
1393-
ty::Projection(_) if ty.has_non_region_param() => TyPosition::new_deref_stable_for_result(precedence, ty),
1394-
ty::Infer(_) | ty::Error(_) | ty::Bound(..) | ty::Opaque(..) | ty::Placeholder(_) | ty::Dynamic(..) => {
1395-
Position::ReborrowStable(precedence).into()
1393+
ty::Alias(ty::Projection, _) if ty.has_non_region_param() => {
1394+
TyPosition::new_deref_stable_for_result(precedence, ty)
13961395
},
1396+
ty::Infer(_)
1397+
| ty::Error(_)
1398+
| ty::Bound(..)
1399+
| ty::Alias(ty::Opaque, ..)
1400+
| ty::Placeholder(_)
1401+
| ty::Dynamic(..) => Position::ReborrowStable(precedence).into(),
13971402
ty::Adt(..) if ty.has_placeholders() || ty.has_opaque_types() => {
13981403
Position::ReborrowStable(precedence).into()
13991404
},
@@ -1417,7 +1422,7 @@ fn ty_auto_deref_stability<'tcx>(cx: &LateContext<'tcx>, ty: Ty<'tcx>, precedenc
14171422
| ty::Closure(..)
14181423
| ty::Never
14191424
| ty::Tuple(_)
1420-
| ty::Projection(_) => {
1425+
| ty::Alias(ty::Projection, _) => {
14211426
Position::DerefStable(precedence, ty.is_sized(cx.tcx, cx.param_env.without_caller_bounds())).into()
14221427
},
14231428
};

clippy_lints/src/derive.rs

+2-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use rustc_middle::hir::nested_filter;
1515
use rustc_middle::traits::Reveal;
1616
use rustc_middle::ty::{
1717
self, Binder, BoundConstness, Clause, GenericParamDefKind, ImplPolarity, ParamEnv, PredicateKind, TraitPredicate,
18-
TraitRef, Ty, TyCtxt,
18+
Ty, TyCtxt,
1919
};
2020
use rustc_session::{declare_lint_pass, declare_tool_lint};
2121
use rustc_span::source_map::Span;
@@ -513,10 +513,7 @@ fn param_env_for_derived_eq(tcx: TyCtxt<'_>, did: DefId, eq_trait_id: DefId) ->
513513
tcx.mk_predicates(ty_predicates.iter().map(|&(p, _)| p).chain(
514514
params.iter().filter(|&&(_, needs_eq)| needs_eq).map(|&(param, _)| {
515515
tcx.mk_predicate(Binder::dummy(PredicateKind::Clause(Clause::Trait(TraitPredicate {
516-
trait_ref: TraitRef::new(
517-
eq_trait_id,
518-
tcx.mk_substs(std::iter::once(tcx.mk_param_from_def(param))),
519-
),
516+
trait_ref: tcx.mk_trait_ref(eq_trait_id, [tcx.mk_param_from_def(param)]),
520517
constness: BoundConstness::NotConst,
521518
polarity: ImplPolarity::Positive,
522519
}))))

clippy_lints/src/disallowed_types.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,9 @@ impl<'tcx> LateLintPass<'tcx> for DisallowedTypes {
106106

107107
fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'tcx>) {
108108
if let ItemKind::Use(path, UseKind::Single) = &item.kind {
109-
self.check_res_emit(cx, &path.res, item.span);
109+
for res in &path.res {
110+
self.check_res_emit(cx, res, item.span);
111+
}
110112
}
111113
}
112114

clippy_lints/src/from_over_into.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ impl<'tcx> LateLintPass<'tcx> for FromOverInto {
7878
&& let Some(GenericArgs { args: [GenericArg::Type(target_ty)], .. }) = into_trait_seg.args
7979
&& let Some(middle_trait_ref) = cx.tcx.impl_trait_ref(item.owner_id)
8080
&& cx.tcx.is_diagnostic_item(sym::Into, middle_trait_ref.def_id)
81-
&& !matches!(middle_trait_ref.substs.type_at(1).kind(), ty::Opaque(..))
81+
&& !matches!(middle_trait_ref.substs.type_at(1).kind(), ty::Alias(ty::Opaque, _))
8282
{
8383
span_lint_and_then(
8484
cx,
@@ -127,7 +127,7 @@ impl<'a, 'tcx> Visitor<'tcx> for SelfFinder<'a, 'tcx> {
127127
self.cx.tcx.hir()
128128
}
129129

130-
fn visit_path(&mut self, path: &'tcx Path<'tcx>, _id: HirId) {
130+
fn visit_path(&mut self, path: &Path<'tcx>, _id: HirId) {
131131
for segment in path.segments {
132132
match segment.ident.name {
133133
kw::SelfLower => self.lower.push(segment.ident.span),

clippy_lints/src/future_not_send.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc_hir::intravisit::FnKind;
44
use rustc_hir::{Body, FnDecl, HirId};
55
use rustc_infer::infer::TyCtxtInferExt;
66
use rustc_lint::{LateContext, LateLintPass};
7-
use rustc_middle::ty::{Clause, EarlyBinder, Opaque, PredicateKind};
7+
use rustc_middle::ty::{self, AliasTy, Clause, EarlyBinder, PredicateKind};
88
use rustc_session::{declare_lint_pass, declare_tool_lint};
99
use rustc_span::{sym, Span};
1010
use rustc_trait_selection::traits::error_reporting::suggestions::TypeErrCtxtExt;
@@ -62,11 +62,11 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
6262
return;
6363
}
6464
let ret_ty = return_ty(cx, hir_id);
65-
if let Opaque(id, subst) = *ret_ty.kind() {
66-
let preds = cx.tcx.explicit_item_bounds(id);
65+
if let ty::Alias(ty::Opaque, AliasTy { def_id, substs, .. }) = *ret_ty.kind() {
66+
let preds = cx.tcx.explicit_item_bounds(def_id);
6767
let mut is_future = false;
6868
for &(p, _span) in preds {
69-
let p = EarlyBinder(p).subst(cx.tcx, subst);
69+
let p = EarlyBinder(p).subst(cx.tcx, substs);
7070
if let Some(trait_pred) = p.to_opt_poly_trait_pred() {
7171
if Some(trait_pred.skip_binder().trait_ref.def_id) == cx.tcx.lang_items().future_trait() {
7272
is_future = true;

clippy_lints/src/invalid_utf8_in_unchecked.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl<'tcx> LateLintPass<'tcx> for InvalidUtf8InUnchecked {
3333
if let Some([arg]) = match_function_call(cx, expr, &paths::STR_FROM_UTF8_UNCHECKED) {
3434
match &arg.kind {
3535
ExprKind::Lit(Spanned { node: lit, .. }) => {
36-
if let LitKind::ByteStr(bytes) = &lit
36+
if let LitKind::ByteStr(bytes, _) = &lit
3737
&& std::str::from_utf8(bytes).is_err()
3838
{
3939
lint(cx, expr.span);

clippy_lints/src/large_include_file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl LateLintPass<'_> for LargeIncludeFile {
6060
then {
6161
let len = match &lit.node {
6262
// include_bytes
63-
LitKind::ByteStr(bstr) => bstr.len(),
63+
LitKind::ByteStr(bstr, _) => bstr.len(),
6464
// include_str
6565
LitKind::Str(sym, _) => sym.as_str().len(),
6666
_ => return,

clippy_lints/src/len_zero.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ fn has_is_empty(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
501501
.filter_by_name_unhygienic(is_empty)
502502
.any(|item| is_is_empty(cx, item))
503503
}),
504-
ty::Projection(ref proj) => has_is_empty_impl(cx, proj.item_def_id),
504+
ty::Alias(ty::Projection, ref proj) => has_is_empty_impl(cx, proj.def_id),
505505
ty::Adt(id, _) => has_is_empty_impl(cx, id.did()),
506506
ty::Array(..) | ty::Slice(..) | ty::Str => true,
507507
_ => false,

clippy_lints/src/macro_use.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,10 @@ impl<'tcx> LateLintPass<'tcx> for MacroUseImports {
9595
let hir_id = item.hir_id();
9696
let attrs = cx.tcx.hir().attrs(hir_id);
9797
if let Some(mac_attr) = attrs.iter().find(|attr| attr.has_name(sym::macro_use));
98-
if let Res::Def(DefKind::Mod, id) = path.res;
98+
if let Some(id) = path.res.iter().find_map(|res| match res {
99+
Res::Def(DefKind::Mod, id) => Some(id),
100+
_ => None,
101+
});
99102
if !id.is_local();
100103
then {
101104
for kid in cx.tcx.module_children(id).iter() {

clippy_lints/src/manual_retain.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ impl<'tcx> LateLintPass<'tcx> for ManualRetain {
7070
&& seg.args.is_none()
7171
&& let hir::ExprKind::MethodCall(_, target_expr, [], _) = &collect_expr.kind
7272
&& let Some(collect_def_id) = cx.typeck_results().type_dependent_def_id(collect_expr.hir_id)
73-
&& match_def_path(cx, collect_def_id, &paths::CORE_ITER_COLLECT) {
73+
&& cx.tcx.is_diagnostic_item(sym::iterator_collect_fn, collect_def_id)
74+
{
7475
check_into_iter(cx, parent_expr, left_expr, target_expr, &self.msrv);
7576
check_iter(cx, parent_expr, left_expr, target_expr, &self.msrv);
7677
check_to_owned(cx, parent_expr, left_expr, target_expr, &self.msrv);

clippy_lints/src/matches/match_same_arms.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl<'a> NormalizedPat<'a> {
282282
// TODO: Handle negative integers. They're currently treated as a wild match.
283283
ExprKind::Lit(lit) => match lit.node {
284284
LitKind::Str(sym, _) => Self::LitStr(sym),
285-
LitKind::ByteStr(ref bytes) => Self::LitBytes(bytes),
285+
LitKind::ByteStr(ref bytes, _) => Self::LitBytes(bytes),
286286
LitKind::Byte(val) => Self::LitInt(val.into()),
287287
LitKind::Char(val) => Self::LitInt(val.into()),
288288
LitKind::Int(val, _) => Self::LitInt(val),

clippy_lints/src/methods/needless_collect.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn iterates_same_ty<'tcx>(cx: &LateContext<'tcx>, iter_ty: Ty<'tcx>, collect_ty:
151151
&& let Some(into_iter_item_proj) = make_projection(cx.tcx, into_iter_trait, item, [collect_ty])
152152
&& let Ok(into_iter_item_ty) = cx.tcx.try_normalize_erasing_regions(
153153
cx.param_env,
154-
cx.tcx.mk_projection(into_iter_item_proj.item_def_id, into_iter_item_proj.substs)
154+
cx.tcx.mk_projection(into_iter_item_proj.def_id, into_iter_item_proj.substs)
155155
)
156156
{
157157
iter_item_ty == into_iter_item_ty

clippy_lints/src/methods/option_map_unwrap_or.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ struct UnwrapVisitor<'a, 'tcx> {
9797
impl<'a, 'tcx> Visitor<'tcx> for UnwrapVisitor<'a, 'tcx> {
9898
type NestedFilter = nested_filter::All;
9999

100-
fn visit_path(&mut self, path: &'tcx Path<'_>, _id: HirId) {
100+
fn visit_path(&mut self, path: &Path<'tcx>, _id: HirId) {
101101
self.identifiers.insert(ident(path));
102102
walk_path(self, path);
103103
}
@@ -116,7 +116,7 @@ struct MapExprVisitor<'a, 'tcx> {
116116
impl<'a, 'tcx> Visitor<'tcx> for MapExprVisitor<'a, 'tcx> {
117117
type NestedFilter = nested_filter::All;
118118

119-
fn visit_path(&mut self, path: &'tcx Path<'_>, _id: HirId) {
119+
fn visit_path(&mut self, path: &Path<'tcx>, _id: HirId) {
120120
if self.identifiers.contains(&ident(path)) {
121121
self.found_identifier = true;
122122
return;

clippy_lints/src/missing_enforced_import_rename.rs

+31-28
Original file line numberDiff line numberDiff line change
@@ -66,35 +66,38 @@ impl LateLintPass<'_> for ImportRename {
6666
}
6767

6868
fn check_item(&mut self, cx: &LateContext<'_>, item: &Item<'_>) {
69-
if_chain! {
70-
if let ItemKind::Use(path, UseKind::Single) = &item.kind;
71-
if let Res::Def(_, id) = path.res;
72-
if let Some(name) = self.renames.get(&id);
73-
// Remove semicolon since it is not present for nested imports
74-
let span_without_semi = cx.sess().source_map().span_until_char(item.span, ';');
75-
if let Some(snip) = snippet_opt(cx, span_without_semi);
76-
if let Some(import) = match snip.split_once(" as ") {
77-
None => Some(snip.as_str()),
78-
Some((import, rename)) => {
79-
if rename.trim() == name.as_str() {
80-
None
81-
} else {
82-
Some(import.trim())
69+
if let ItemKind::Use(path, UseKind::Single) = &item.kind {
70+
for &res in &path.res {
71+
if_chain! {
72+
if let Res::Def(_, id) = res;
73+
if let Some(name) = self.renames.get(&id);
74+
// Remove semicolon since it is not present for nested imports
75+
let span_without_semi = cx.sess().source_map().span_until_char(item.span, ';');
76+
if let Some(snip) = snippet_opt(cx, span_without_semi);
77+
if let Some(import) = match snip.split_once(" as ") {
78+
None => Some(snip.as_str()),
79+
Some((import, rename)) => {
80+
if rename.trim() == name.as_str() {
81+
None
82+
} else {
83+
Some(import.trim())
84+
}
85+
},
86+
};
87+
then {
88+
span_lint_and_sugg(
89+
cx,
90+
MISSING_ENFORCED_IMPORT_RENAMES,
91+
span_without_semi,
92+
"this import should be renamed",
93+
"try",
94+
format!(
95+
"{import} as {name}",
96+
),
97+
Applicability::MachineApplicable,
98+
);
8399
}
84-
},
85-
};
86-
then {
87-
span_lint_and_sugg(
88-
cx,
89-
MISSING_ENFORCED_IMPORT_RENAMES,
90-
span_without_semi,
91-
"this import should be renamed",
92-
"try",
93-
format!(
94-
"{import} as {name}",
95-
),
96-
Applicability::MachineApplicable,
97-
);
100+
}
98101
}
99102
}
100103
}

clippy_lints/src/redundant_pub_crate.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ impl<'tcx> LateLintPass<'tcx> for RedundantPubCrate {
8484

8585
fn is_not_macro_export<'tcx>(item: &'tcx Item<'tcx>) -> bool {
8686
if let ItemKind::Use(path, _) = item.kind {
87-
if let Res::Def(DefKind::Macro(MacroKind::Bang), _) = path.res {
87+
if path
88+
.res
89+
.iter()
90+
.all(|res| matches!(res, Res::Def(DefKind::Macro(MacroKind::Bang), _)))
91+
{
8892
return false;
8993
}
9094
} else if let ItemKind::Macro(..) = item.kind {

clippy_lints/src/single_component_path_imports.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ impl SingleComponentPathImports {
149149

150150
// keep track of `use some_module;` usages
151151
if segments.len() == 1 {
152-
if let UseTreeKind::Simple(None, _, _) = use_tree.kind {
152+
if let UseTreeKind::Simple(None) = use_tree.kind {
153153
let name = segments[0].ident.name;
154154
if !macros.contains(&name) {
155155
single_use_usages.push(SingleUse {
@@ -169,7 +169,7 @@ impl SingleComponentPathImports {
169169
for tree in trees {
170170
let segments = &tree.0.prefix.segments;
171171
if segments.len() == 1 {
172-
if let UseTreeKind::Simple(None, _, _) = tree.0.kind {
172+
if let UseTreeKind::Simple(None) = tree.0.kind {
173173
let name = segments[0].ident.name;
174174
if !macros.contains(&name) {
175175
single_use_usages.push(SingleUse {

clippy_lints/src/unnecessary_self_imports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ impl EarlyLintPass for UnnecessarySelfImports {
5757
format!(
5858
"{}{};",
5959
last_segment.ident,
60-
if let UseTreeKind::Simple(Some(alias), ..) = self_tree.kind { format!(" as {alias}") } else { String::new() },
60+
if let UseTreeKind::Simple(Some(alias)) = self_tree.kind { format!(" as {alias}") } else { String::new() },
6161
),
6262
Applicability::MaybeIncorrect,
6363
);

clippy_lints/src/unsafe_removed_from_name.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl EarlyLintPass for UnsafeNameRemoval {
3939

4040
fn check_use_tree(use_tree: &UseTree, cx: &EarlyContext<'_>, span: Span) {
4141
match use_tree.kind {
42-
UseTreeKind::Simple(Some(new_name), ..) => {
42+
UseTreeKind::Simple(Some(new_name)) => {
4343
let old_name = use_tree
4444
.prefix
4545
.segments
@@ -48,7 +48,7 @@ fn check_use_tree(use_tree: &UseTree, cx: &EarlyContext<'_>, span: Span) {
4848
.ident;
4949
unsafe_to_safe_check(old_name, new_name, cx, span);
5050
},
51-
UseTreeKind::Simple(None, ..) | UseTreeKind::Glob => {},
51+
UseTreeKind::Simple(None) | UseTreeKind::Glob => {},
5252
UseTreeKind::Nested(ref nested_use_tree) => {
5353
for (use_tree, _) in nested_use_tree {
5454
check_use_tree(use_tree, cx, span);

clippy_lints/src/utils/author.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
299299
};
300300
kind!("Float(_, {float_ty})");
301301
},
302-
LitKind::ByteStr(ref vec) => {
302+
LitKind::ByteStr(ref vec, _) => {
303303
bind!(self, vec);
304304
kind!("ByteStr(ref {vec})");
305305
chain!(self, "let [{:?}] = **{vec}", vec.value);

clippy_lints/src/utils/internal_lints/invalid_paths.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use rustc_hir::def::DefKind;
77
use rustc_hir::Item;
88
use rustc_hir_analysis::hir_ty_to_ty;
99
use rustc_lint::{LateContext, LateLintPass};
10-
use rustc_middle::ty::{self, fast_reject::SimplifiedTypeGen, FloatTy};
10+
use rustc_middle::ty::{self, fast_reject::SimplifiedType, FloatTy};
1111
use rustc_session::{declare_lint_pass, declare_tool_lint};
1212
use rustc_span::symbol::Symbol;
1313

@@ -73,10 +73,10 @@ pub fn check_path(cx: &LateContext<'_>, path: &[&str]) -> bool {
7373
let lang_items = cx.tcx.lang_items();
7474
// This list isn't complete, but good enough for our current list of paths.
7575
let incoherent_impls = [
76-
SimplifiedTypeGen::FloatSimplifiedType(FloatTy::F32),
77-
SimplifiedTypeGen::FloatSimplifiedType(FloatTy::F64),
78-
SimplifiedTypeGen::SliceSimplifiedType,
79-
SimplifiedTypeGen::StrSimplifiedType,
76+
SimplifiedType::FloatSimplifiedType(FloatTy::F32),
77+
SimplifiedType::FloatSimplifiedType(FloatTy::F64),
78+
SimplifiedType::SliceSimplifiedType,
79+
SimplifiedType::StrSimplifiedType,
8080
]
8181
.iter()
8282
.flat_map(|&ty| cx.tcx.incoherent_impls(ty).iter().copied());

clippy_lints/src/utils/internal_lints/lint_without_lint_pass.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ struct LintCollector<'a, 'tcx> {
330330
impl<'a, 'tcx> Visitor<'tcx> for LintCollector<'a, 'tcx> {
331331
type NestedFilter = nested_filter::All;
332332

333-
fn visit_path(&mut self, path: &'tcx Path<'_>, _: HirId) {
333+
fn visit_path(&mut self, path: &Path<'_>, _: HirId) {
334334
if path.segments.len() == 1 {
335335
self.output.insert(path.segments[0].ident.name);
336336
}

clippy_lints/src/utils/internal_lints/metadata_collector.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1019,7 +1019,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for ApplicabilityResolver<'a, 'hir> {
10191019
self.cx.tcx.hir()
10201020
}
10211021

1022-
fn visit_path(&mut self, path: &'hir hir::Path<'hir>, _id: hir::HirId) {
1022+
fn visit_path(&mut self, path: &hir::Path<'hir>, _id: hir::HirId) {
10231023
for (index, enum_value) in paths::APPLICABILITY_VALUES.iter().enumerate() {
10241024
if match_path(path, enum_value) {
10251025
self.add_new_index(index);

0 commit comments

Comments
 (0)