Skip to content

Split Diagnostics for Uncommon Codepoints: Add List to Display Characters Involved #120258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename LintLevelsBuilder::emit_spanned_lint as `LintLevelsBuilder::…
…emit_span_lint`.
  • Loading branch information
nnethercote authored and HTGAzureX1212 committed Jan 23, 2024
commit 9543d3098da63d2dc8643de98a78d6eb8ac971ec
14 changes: 7 additions & 7 deletions compiler/rustc_lint/src/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
sub,
});
} else {
self.emit_spanned_lint(
self.emit_span_lint(
FORBIDDEN_LINT_GROUPS,
src.span().into(),
OverruledAttributeLint {
Expand Down Expand Up @@ -925,7 +925,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
}
Err((Some(ids), ref new_lint_name)) => {
let lint = builtin::RENAMED_AND_REMOVED_LINTS;
self.emit_spanned_lint(
self.emit_span_lint(
lint,
sp.into(),
DeprecatedLintName {
Expand Down Expand Up @@ -976,13 +976,13 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
RenamedLintSuggestion::WithSpan { suggestion: sp, replace };
let name = tool_ident.map(|tool| format!("{tool}::{name}")).unwrap_or(name);
let lint = RenamedLint { name: name.as_str(), suggestion };
self.emit_spanned_lint(RENAMED_AND_REMOVED_LINTS, sp.into(), lint);
self.emit_span_lint(RENAMED_AND_REMOVED_LINTS, sp.into(), lint);
}

CheckLintNameResult::Removed(ref reason) => {
let name = tool_ident.map(|tool| format!("{tool}::{name}")).unwrap_or(name);
let lint = RemovedLint { name: name.as_str(), reason };
self.emit_spanned_lint(RENAMED_AND_REMOVED_LINTS, sp.into(), lint);
self.emit_span_lint(RENAMED_AND_REMOVED_LINTS, sp.into(), lint);
}

CheckLintNameResult::NoLint(suggestion) => {
Expand All @@ -995,7 +995,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
UnknownLintSuggestion::WithSpan { suggestion: sp, replace, from_rustc }
});
let lint = UnknownLint { name, suggestion };
self.emit_spanned_lint(UNKNOWN_LINTS, sp.into(), lint);
self.emit_span_lint(UNKNOWN_LINTS, sp.into(), lint);
}
}
// If this lint was renamed, apply the new lint instead of ignoring the attribute.
Expand Down Expand Up @@ -1041,7 +1041,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
continue;
};

self.emit_spanned_lint(
self.emit_span_lint(
UNUSED_ATTRIBUTES,
lint_attr_span.into(),
IgnoredUnlessCrateSpecified { level: level.as_str(), name: lint_attr_name },
Expand Down Expand Up @@ -1111,7 +1111,7 @@ impl<'s, P: LintLevelsProvider> LintLevelsBuilder<'s, P> {
}

#[track_caller]
pub fn emit_spanned_lint(
pub fn emit_span_lint(
&self,
lint: &'static Lint,
span: MultiSpan,
Expand Down