Skip to content

Commit 36f95ab

Browse files
committed
Fallout in other crates.
1 parent c737c07 commit 36f95ab

File tree

30 files changed

+248
-226
lines changed

30 files changed

+248
-226
lines changed

src/librustc_lint/builtin.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ impl UnreachablePub {
983983
cx: &LateContext<'_, '_>,
984984
what: &str,
985985
id: hir::HirId,
986-
vis: &hir::Visibility,
986+
vis: &hir::Visibility<'_>,
987987
span: Span,
988988
exportable: bool,
989989
) {
@@ -1065,7 +1065,7 @@ declare_lint_pass!(
10651065
);
10661066

10671067
impl TypeAliasBounds {
1068-
fn is_type_variable_assoc(qpath: &hir::QPath) -> bool {
1068+
fn is_type_variable_assoc(qpath: &hir::QPath<'_>) -> bool {
10691069
match *qpath {
10701070
hir::QPath::TypeRelative(ref ty, _) => {
10711071
// If this is a type variable, we found a `T::Assoc`.
@@ -1081,7 +1081,7 @@ impl TypeAliasBounds {
10811081
}
10821082
}
10831083

1084-
fn suggest_changing_assoc_types(ty: &hir::Ty, err: &mut DiagnosticBuilder<'_>) {
1084+
fn suggest_changing_assoc_types(ty: &hir::Ty<'_>, err: &mut DiagnosticBuilder<'_>) {
10851085
// Access to associates types should use `<T as Bound>::Assoc`, which does not need a
10861086
// bound. Let's see if this type does that.
10871087

@@ -1095,7 +1095,7 @@ impl TypeAliasBounds {
10951095
intravisit::NestedVisitorMap::None
10961096
}
10971097

1098-
fn visit_qpath(&mut self, qpath: &'v hir::QPath, id: hir::HirId, span: Span) {
1098+
fn visit_qpath(&mut self, qpath: &'v hir::QPath<'v>, id: hir::HirId, span: Span) {
10991099
if TypeAliasBounds::is_type_variable_assoc(qpath) {
11001100
self.err.span_help(
11011101
span,
@@ -1533,7 +1533,7 @@ impl ExplicitOutlivesRequirements {
15331533

15341534
fn collect_outlived_lifetimes<'tcx>(
15351535
&self,
1536-
param: &'tcx hir::GenericParam,
1536+
param: &'tcx hir::GenericParam<'tcx>,
15371537
tcx: TyCtxt<'tcx>,
15381538
inferred_outlives: &'tcx [(ty::Predicate<'tcx>, Span)],
15391539
ty_generics: &'tcx ty::Generics,
@@ -1554,7 +1554,7 @@ impl ExplicitOutlivesRequirements {
15541554
fn collect_outlives_bound_spans<'tcx>(
15551555
&self,
15561556
tcx: TyCtxt<'tcx>,
1557-
bounds: &hir::GenericBounds,
1557+
bounds: &hir::GenericBounds<'_>,
15581558
inferred_outlives: &[ty::Region<'tcx>],
15591559
infer_static: bool,
15601560
) -> Vec<(usize, Span)> {
@@ -1585,7 +1585,7 @@ impl ExplicitOutlivesRequirements {
15851585
fn consolidate_outlives_bound_spans(
15861586
&self,
15871587
lo: Span,
1588-
bounds: &hir::GenericBounds,
1588+
bounds: &hir::GenericBounds<'_>,
15891589
bound_spans: Vec<(usize, Span)>,
15901590
) -> Vec<Span> {
15911591
if bounds.is_empty() {

src/librustc_lint/nonstandard_style.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonSnakeCase {
293293
}
294294
}
295295

296-
fn check_generic_param(&mut self, cx: &LateContext<'_, '_>, param: &hir::GenericParam) {
296+
fn check_generic_param(&mut self, cx: &LateContext<'_, '_>, param: &hir::GenericParam<'_>) {
297297
if let GenericParamKind::Lifetime { .. } = param.kind {
298298
self.check_snake_case(cx, "lifetime", &param.name.ident());
299299
}
@@ -303,7 +303,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonSnakeCase {
303303
&mut self,
304304
cx: &LateContext<'_, '_>,
305305
fk: FnKind<'_>,
306-
_: &hir::FnDecl,
306+
_: &hir::FnDecl<'_>,
307307
_: &hir::Body<'_>,
308308
_: Span,
309309
id: hir::HirId,
@@ -425,7 +425,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NonUpperCaseGlobals {
425425
}
426426
}
427427

428-
fn check_generic_param(&mut self, cx: &LateContext<'_, '_>, param: &hir::GenericParam) {
428+
fn check_generic_param(&mut self, cx: &LateContext<'_, '_>, param: &hir::GenericParam<'_>) {
429429
if let GenericParamKind::Const { .. } = param.kind {
430430
NonUpperCaseGlobals::check_upper_case(cx, "const parameter", &param.name.ident());
431431
}

src/librustc_lint/types.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -963,12 +963,12 @@ impl<'a, 'tcx> ImproperCTypesVisitor<'a, 'tcx> {
963963
}
964964
}
965965

966-
fn check_foreign_fn(&mut self, id: hir::HirId, decl: &hir::FnDecl) {
966+
fn check_foreign_fn(&mut self, id: hir::HirId, decl: &hir::FnDecl<'_>) {
967967
let def_id = self.cx.tcx.hir().local_def_id(id);
968968
let sig = self.cx.tcx.fn_sig(def_id);
969969
let sig = self.cx.tcx.erase_late_bound_regions(&sig);
970970

971-
for (input_ty, input_hir) in sig.inputs().iter().zip(&decl.inputs) {
971+
for (input_ty, input_hir) in sig.inputs().iter().zip(decl.inputs) {
972972
self.check_type_for_ffi_and_report_errors(input_hir.span, input_ty, false);
973973
}
974974

src/librustc_metadata/rmeta/encoder.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ impl EncodeContext<'tcx> {
664664
id: hir::HirId,
665665
md: &hir::Mod<'_>,
666666
attrs: &[ast::Attribute],
667-
vis: &hir::Visibility,
667+
vis: &hir::Visibility<'_>,
668668
) {
669669
let tcx = self.tcx;
670670
let def_id = tcx.hir().local_def_id(id);
@@ -1547,7 +1547,7 @@ impl Visitor<'tcx> for EncodeContext<'tcx> {
15471547
let def_id = self.tcx.hir().local_def_id(ni.hir_id);
15481548
self.encode_info_for_foreign_item(def_id, ni);
15491549
}
1550-
fn visit_generics(&mut self, generics: &'tcx hir::Generics) {
1550+
fn visit_generics(&mut self, generics: &'tcx hir::Generics<'tcx>) {
15511551
intravisit::walk_generics(self, generics);
15521552
self.encode_info_for_generics(generics);
15531553
}
@@ -1568,7 +1568,7 @@ impl EncodeContext<'tcx> {
15681568
}
15691569
}
15701570

1571-
fn encode_info_for_generics(&mut self, generics: &hir::Generics) {
1571+
fn encode_info_for_generics(&mut self, generics: &hir::Generics<'tcx>) {
15721572
for param in &generics.params {
15731573
let def_id = self.tcx.hir().local_def_id(param.hir_id);
15741574
match param.kind {

src/librustc_mir/borrow_check/diagnostics/region_name.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
410410
) -> Option<RegionName> {
411411
let mir_hir_id = infcx.tcx.hir().as_local_hir_id(mir_def_id)?;
412412
let fn_decl = infcx.tcx.hir().fn_decl_by_hir_id(mir_hir_id)?;
413-
let argument_hir_ty: &hir::Ty = fn_decl.inputs.get(argument_index)?;
413+
let argument_hir_ty: &hir::Ty<'_> = fn_decl.inputs.get(argument_index)?;
414414
match argument_hir_ty.kind {
415415
// This indicates a variable with no type annotation, like
416416
// `|x|`... in that case, we can't highlight the type but
@@ -504,10 +504,10 @@ impl<'tcx> RegionInferenceContext<'tcx> {
504504
tcx: TyCtxt<'tcx>,
505505
needle_fr: RegionVid,
506506
argument_ty: Ty<'tcx>,
507-
argument_hir_ty: &hir::Ty,
507+
argument_hir_ty: &hir::Ty<'_>,
508508
renctx: &mut RegionErrorNamingCtx,
509509
) -> Option<RegionName> {
510-
let search_stack: &mut Vec<(Ty<'tcx>, &hir::Ty)> =
510+
let search_stack: &mut Vec<(Ty<'tcx>, &hir::Ty<'_>)> =
511511
&mut vec![(argument_ty, argument_hir_ty)];
512512

513513
while let Some((ty, hir_ty)) = search_stack.pop() {
@@ -570,7 +570,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
570570
// just worry about trying to match up the rustc type
571571
// with the HIR types:
572572
(ty::Tuple(elem_tys), hir::TyKind::Tup(elem_hir_tys)) => {
573-
search_stack.extend(elem_tys.iter().map(|k| k.expect_ty()).zip(elem_hir_tys));
573+
search_stack.extend(elem_tys.iter().map(|k| k.expect_ty()).zip(*elem_hir_tys));
574574
}
575575

576576
(ty::Slice(elem_ty), hir::TyKind::Slice(elem_hir_ty))
@@ -600,9 +600,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
600600
&self,
601601
substs: SubstsRef<'tcx>,
602602
needle_fr: RegionVid,
603-
last_segment: &'hir hir::PathSegment,
603+
last_segment: &'hir hir::PathSegment<'hir>,
604604
renctx: &mut RegionErrorNamingCtx,
605-
search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty)>,
605+
search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty<'hir>)>,
606606
) -> Option<RegionName> {
607607
// Did the user give explicit arguments? (e.g., `Foo<..>`)
608608
let args = last_segment.args.as_ref()?;
@@ -647,8 +647,8 @@ impl<'tcx> RegionInferenceContext<'tcx> {
647647
&self,
648648
substs: SubstsRef<'tcx>,
649649
needle_fr: RegionVid,
650-
args: &'hir hir::GenericArgs,
651-
search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty)>,
650+
args: &'hir hir::GenericArgs<'hir>,
651+
search_stack: &mut Vec<(Ty<'tcx>, &'hir hir::Ty<'hir>)>,
652652
) -> Option<&'hir hir::Lifetime> {
653653
for (kind, hir_arg) in substs.iter().zip(&args.args) {
654654
match (kind.unpack(), hir_arg) {

src/librustc_mir/hair/pattern/check_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ fn const_not_var(
255255
err: &mut DiagnosticBuilder<'_>,
256256
tcx: TyCtxt<'_>,
257257
pat: &Pat<'_>,
258-
path: &hir::Path,
258+
path: &hir::Path<'_>,
259259
) {
260260
let descr = path.res.descr();
261261
err.span_label(

src/librustc_mir/hair/pattern/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,7 @@ impl<'a, 'tcx> PatCtxt<'a, 'tcx> {
732732
/// Takes a HIR Path. If the path is a constant, evaluates it and feeds
733733
/// it to `const_to_pat`. Any other path (like enum variants without fields)
734734
/// is converted to the corresponding pattern via `lower_variant_or_leaf`.
735-
fn lower_path(&mut self, qpath: &hir::QPath, id: hir::HirId, span: Span) -> Pat<'tcx> {
735+
fn lower_path(&mut self, qpath: &hir::QPath<'_>, id: hir::HirId, span: Span) -> Pat<'tcx> {
736736
let ty = self.tables.node_type(id);
737737
let res = self.tables.qpath_res(qpath, id);
738738
let is_associated_const = match res {

src/librustc_mir/transform/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn mir_keys(tcx: TyCtxt<'_>, krate: CrateNum) -> &DefIdSet {
7777
&mut self,
7878
v: &'tcx hir::VariantData<'tcx>,
7979
_: ast::Name,
80-
_: &'tcx hir::Generics,
80+
_: &'tcx hir::Generics<'tcx>,
8181
_: hir::HirId,
8282
_: Span,
8383
) {

src/librustc_passes/dead.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
229229
&mut self,
230230
def: &'tcx hir::VariantData<'tcx>,
231231
_: ast::Name,
232-
_: &hir::Generics,
232+
_: &hir::Generics<'_>,
233233
_: hir::HirId,
234234
_: syntax_pos::Span,
235235
) {
@@ -295,12 +295,12 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
295295
self.in_pat = false;
296296
}
297297

298-
fn visit_path(&mut self, path: &'tcx hir::Path, _: hir::HirId) {
298+
fn visit_path(&mut self, path: &'tcx hir::Path<'tcx>, _: hir::HirId) {
299299
self.handle_res(path.res);
300300
intravisit::walk_path(self, path);
301301
}
302302

303-
fn visit_ty(&mut self, ty: &'tcx hir::Ty) {
303+
fn visit_ty(&mut self, ty: &'tcx hir::Ty<'tcx>) {
304304
match ty.kind {
305305
TyKind::Def(item_id, _) => {
306306
let item = self.tcx.hir().expect_item(item_id.id);
@@ -619,7 +619,7 @@ impl Visitor<'tcx> for DeadVisitor<'tcx> {
619619
fn visit_variant(
620620
&mut self,
621621
variant: &'tcx hir::Variant<'tcx>,
622-
g: &'tcx hir::Generics,
622+
g: &'tcx hir::Generics<'tcx>,
623623
id: hir::HirId,
624624
) {
625625
if self.should_warn_about_variant(&variant) {

src/librustc_passes/hir_stats.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,15 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
160160
hir_visit::walk_expr(self, ex)
161161
}
162162

163-
fn visit_ty(&mut self, t: &'v hir::Ty) {
163+
fn visit_ty(&mut self, t: &'v hir::Ty<'v>) {
164164
self.record("Ty", Id::Node(t.hir_id), t);
165165
hir_visit::walk_ty(self, t)
166166
}
167167

168168
fn visit_fn(
169169
&mut self,
170170
fk: hir_visit::FnKind<'v>,
171-
fd: &'v hir::FnDecl,
171+
fd: &'v hir::FnDecl<'v>,
172172
b: hir::BodyId,
173173
s: Span,
174174
id: hir::HirId,
@@ -177,7 +177,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
177177
hir_visit::walk_fn(self, fk, fd, b, s, id)
178178
}
179179

180-
fn visit_where_predicate(&mut self, predicate: &'v hir::WherePredicate) {
180+
fn visit_where_predicate(&mut self, predicate: &'v hir::WherePredicate<'v>) {
181181
self.record("WherePredicate", Id::None, predicate);
182182
hir_visit::walk_where_predicate(self, predicate)
183183
}
@@ -192,7 +192,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
192192
hir_visit::walk_impl_item(self, ii)
193193
}
194194

195-
fn visit_param_bound(&mut self, bounds: &'v hir::GenericBound) {
195+
fn visit_param_bound(&mut self, bounds: &'v hir::GenericBound<'v>) {
196196
self.record("GenericBound", Id::None, bounds);
197197
hir_visit::walk_param_bound(self, bounds)
198198
}
@@ -205,7 +205,7 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
205205
fn visit_variant(
206206
&mut self,
207207
v: &'v hir::Variant<'v>,
208-
g: &'v hir::Generics,
208+
g: &'v hir::Generics<'v>,
209209
item_id: hir::HirId,
210210
) {
211211
self.record("Variant", Id::None, v);
@@ -217,22 +217,22 @@ impl<'v> hir_visit::Visitor<'v> for StatCollector<'v> {
217217
hir_visit::walk_lifetime(self, lifetime)
218218
}
219219

220-
fn visit_qpath(&mut self, qpath: &'v hir::QPath, id: hir::HirId, span: Span) {
220+
fn visit_qpath(&mut self, qpath: &'v hir::QPath<'v>, id: hir::HirId, span: Span) {
221221
self.record("QPath", Id::None, qpath);
222222
hir_visit::walk_qpath(self, qpath, id, span)
223223
}
224224

225-
fn visit_path(&mut self, path: &'v hir::Path, _id: hir::HirId) {
225+
fn visit_path(&mut self, path: &'v hir::Path<'v>, _id: hir::HirId) {
226226
self.record("Path", Id::None, path);
227227
hir_visit::walk_path(self, path)
228228
}
229229

230-
fn visit_path_segment(&mut self, path_span: Span, path_segment: &'v hir::PathSegment) {
230+
fn visit_path_segment(&mut self, path_span: Span, path_segment: &'v hir::PathSegment<'v>) {
231231
self.record("PathSegment", Id::None, path_segment);
232232
hir_visit::walk_path_segment(self, path_span, path_segment)
233233
}
234234

235-
fn visit_assoc_type_binding(&mut self, type_binding: &'v hir::TypeBinding) {
235+
fn visit_assoc_type_binding(&mut self, type_binding: &'v hir::TypeBinding<'v>) {
236236
self.record("TypeBinding", Id::Node(type_binding.hir_id), type_binding);
237237
hir_visit::walk_assoc_type_binding(self, type_binding)
238238
}

src/librustc_passes/liveness.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ impl<'tcx> Visitor<'tcx> for IrMaps<'tcx> {
162162
fn visit_fn(
163163
&mut self,
164164
fk: FnKind<'tcx>,
165-
fd: &'tcx hir::FnDecl,
165+
fd: &'tcx hir::FnDecl<'tcx>,
166166
b: hir::BodyId,
167167
s: Span,
168168
id: HirId,
@@ -351,7 +351,7 @@ impl IrMaps<'tcx> {
351351
fn visit_fn<'tcx>(
352352
ir: &mut IrMaps<'tcx>,
353353
fk: FnKind<'tcx>,
354-
decl: &'tcx hir::FnDecl,
354+
decl: &'tcx hir::FnDecl<'tcx>,
355355
body_id: hir::BodyId,
356356
sp: Span,
357357
id: hir::HirId,
@@ -1285,7 +1285,7 @@ impl<'a, 'tcx> Liveness<'a, 'tcx> {
12851285
fn access_path(
12861286
&mut self,
12871287
hir_id: HirId,
1288-
path: &hir::Path,
1288+
path: &hir::Path<'_>,
12891289
succ: LiveNode,
12901290
acc: u32,
12911291
) -> LiveNode {

0 commit comments

Comments
 (0)