Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7f565ed

Browse files
Don't pass lint back out of lint decorator
1 parent 4d1bd0d commit 7f565ed

File tree

38 files changed

+50
-116
lines changed

38 files changed

+50
-116
lines changed

compiler/rustc_codegen_ssa/src/codegen_attrs.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,9 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs {
578578
hir_id,
579579
no_sanitize_span,
580580
"`no_sanitize` will have no effect after inlining",
581-
|lint| lint.span_note(inline_span, "inlining requested here"),
581+
|lint| {
582+
lint.span_note(inline_span, "inlining requested here");
583+
},
582584
)
583585
}
584586
}

compiler/rustc_hir_analysis/src/astconv/generics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ pub(crate) fn prohibit_explicit_late_bound_lifetimes(
661661
args.args[0].hir_id(),
662662
multispan,
663663
msg,
664-
|lint| lint,
664+
|_| {},
665665
);
666666
}
667667

compiler/rustc_hir_analysis/src/astconv/lint.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
122122
Applicability::MachineApplicable,
123123
);
124124
self.maybe_lint_blanket_trait_impl(self_ty, lint);
125-
lint
126125
},
127126
);
128127
}

compiler/rustc_hir_analysis/src/astconv/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,8 +1506,6 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
15061506
format!("<{} as {}>::{}", qself_ty, tcx.item_name(trait_did), assoc_ident),
15071507
Applicability::MachineApplicable,
15081508
);
1509-
1510-
lint
15111509
},
15121510
);
15131511
}

compiler/rustc_hir_analysis/src/check/check.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn check_abi(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Abi) {
5151
hir_id,
5252
span,
5353
"use of calling convention not supported on this target",
54-
|lint| lint,
54+
|_| {},
5555
);
5656
}
5757
}
@@ -190,7 +190,7 @@ fn check_static_inhabited(tcx: TyCtxt<'_>, def_id: LocalDefId) {
190190
"static of uninhabited type",
191191
|lint| {
192192
lint
193-
.note("uninhabited statics cannot be initialized, and any access would be an immediate error")
193+
.note("uninhabited statics cannot be initialized, and any access would be an immediate error");
194194
},
195195
);
196196
}
@@ -1093,7 +1093,7 @@ pub(super) fn check_transparent<'tcx>(tcx: TyCtxt<'tcx>, adt: ty::AdtDef<'tcx>)
10931093
"this {descr} contains `{field_ty}`, which {note}, \
10941094
and makes it not a breaking change to become \
10951095
non-zero-sized in the future."
1096-
))
1096+
));
10971097
},
10981098
)
10991099
} else {

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ fn emit_implied_wf_lint<'tcx>(
574574
Applicability::MaybeIncorrect,
575575
);
576576
}
577-
lint
578577
},
579578
);
580579
}

compiler/rustc_hir_analysis/src/check/intrinsicck.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,6 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
269269
lint.help(format!(
270270
"or use `{{{idx}:{default_modifier}}}` to keep the default formatting of `{default_result}`",
271271
));
272-
lint
273272
},
274273
);
275274
}

compiler/rustc_hir_analysis/src/check_unused.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn check_unused_traits(tcx: TyCtxt<'_>, (): ()) {
4545
item.hir_id(),
4646
path.span,
4747
msg,
48-
|lint| lint,
48+
|_| {},
4949
);
5050
}
5151
}

compiler/rustc_hir_analysis/src/coherence/orphan.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ fn lint_auto_trait_impl<'tcx>(
522522
format!(
523523
"try using the same sequence of generic parameters as the {self_descr} definition",
524524
),
525-
)
525+
);
526526
},
527527
);
528528
}

compiler/rustc_hir_analysis/src/collect/generics_of.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ pub(super) fn generics_of(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::Generics {
279279
param.hir_id,
280280
param.span,
281281
TYPE_DEFAULT_NOT_ALLOWED,
282-
|lint| lint,
282+
|_| {},
283283
);
284284
}
285285
Defaults::Deny => {

0 commit comments

Comments
 (0)