) {
// Avoid codegen bloat from monomorphization by immediately doing dyn dispatch of `decorate` to
// the "real" work.
- fn struct_lint_level_impl(
+ fn struct_lint_level_impl<'s, 'd>(
sess: &'s Session,
lint: &'static Lint,
level: Level,
Level::Allow => "-A",
Level::ForceWarn => "--force-warn",
};
- let hyphen_case_lint_name = name.replace("_", "-");
+ let hyphen_case_lint_name = name.replace('_', "-");
if lint_flag_val.as_str() == name {
sess.diag_note_once(
&mut err,
),
);
} else {
- let hyphen_case_flag_val = lint_flag_val.as_str().replace("_", "-");
+ let hyphen_case_flag_val = lint_flag_val.as_str().replace('_', "-");
sess.diag_note_once(
&mut err,
DiagnosticMessageId::from(lint),
}
LintLevelSource::Node(lint_attr_name, src, reason) => {
if let Some(rationale) = reason {
- err.note(&rationale.as_str());
+ err.note(rationale.as_str());
}
sess.diag_span_note_once(
&mut err,