Rename LintLevelsBuilder::struct_lint
as LintLevelsBuilder::opt_span_lint
.
This commit is contained in:
parent
1881bfaa2b
commit
749afe2050
3 changed files with 3 additions and 3 deletions
|
@ -700,7 +700,7 @@ impl LintContext for EarlyContext<'_> {
|
||||||
msg: impl Into<DiagnosticMessage>,
|
msg: impl Into<DiagnosticMessage>,
|
||||||
decorate: impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>),
|
decorate: impl for<'a, 'b> FnOnce(&'b mut DiagnosticBuilder<'a, ()>),
|
||||||
) {
|
) {
|
||||||
self.builder.struct_lint(lint, span.map(|s| s.into()), msg, decorate)
|
self.builder.opt_span_lint(lint, span.map(|s| s.into()), msg, decorate)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_lint_level(&self, lint: &'static Lint) -> Level {
|
fn get_lint_level(&self, lint: &'static Lint) -> Level {
|
||||||
|
|
|
@ -1099,7 +1099,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
|
||||||
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
/// [`struct_lint_level`]: rustc_middle::lint::struct_lint_level#decorate-signature
|
||||||
#[rustc_lint_diagnostics]
|
#[rustc_lint_diagnostics]
|
||||||
#[track_caller]
|
#[track_caller]
|
||||||
pub(crate) fn struct_lint(
|
pub(crate) fn opt_span_lint(
|
||||||
&self,
|
&self,
|
||||||
lint: &'static Lint,
|
lint: &'static Lint,
|
||||||
span: Option<MultiSpan>,
|
span: Option<MultiSpan>,
|
||||||
|
|
|
@ -387,7 +387,7 @@ fn report_conflicting_impls<'tcx>(
|
||||||
let impl_span = tcx.def_span(impl_def_id);
|
let impl_span = tcx.def_span(impl_def_id);
|
||||||
|
|
||||||
// Work to be done after we've built the DiagnosticBuilder. We have to define it
|
// Work to be done after we've built the DiagnosticBuilder. We have to define it
|
||||||
// now because the struct_lint methods don't return back the DiagnosticBuilder
|
// now because the lint emit methods don't return back the DiagnosticBuilder
|
||||||
// that's passed in.
|
// that's passed in.
|
||||||
fn decorate<'tcx>(
|
fn decorate<'tcx>(
|
||||||
tcx: TyCtxt<'tcx>,
|
tcx: TyCtxt<'tcx>,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue