diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2025-01-27 15:38:30 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-27 15:38:30 +0100 |
| commit | 03fdcffa1ebc2034af361e8527ad5caf92f07ae5 (patch) | |
| tree | 2749af06db172099038d70db43da778fdef5596f /compiler/rustc_mir_build/src/errors.rs | |
| parent | f4a5cbd0d8078ca2602f588c0c7f444041d86e92 (diff) | |
| parent | c08624d8d218beb86d89a794ab285144248c7545 (diff) | |
| download | rust-03fdcffa1ebc2034af361e8527ad5caf92f07ae5.tar.gz rust-03fdcffa1ebc2034af361e8527ad5caf92f07ae5.zip | |
Rollup merge of #136114 - compiler-errors:more-idents, r=jieyouxu
Use identifiers more in diagnostics code This should make the diagnostics code slightly more correct when rendering idents in mixed crate edition situations. Kinda a no-op, but a cleanup regardless. r? oli-obk or reassign
Diffstat (limited to 'compiler/rustc_mir_build/src/errors.rs')
| -rw-r--r-- | compiler/rustc_mir_build/src/errors.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs index c3bf5868eec..1f87bf0dbbb 100644 --- a/compiler/rustc_mir_build/src/errors.rs +++ b/compiler/rustc_mir_build/src/errors.rs @@ -7,7 +7,7 @@ use rustc_macros::{Diagnostic, LintDiagnostic, Subdiagnostic}; use rustc_middle::ty::{self, Ty}; use rustc_pattern_analysis::errors::Uncovered; use rustc_pattern_analysis::rustc::RustcPatCtxt; -use rustc_span::{Span, Symbol}; +use rustc_span::{Ident, Span, Symbol}; use crate::fluent_generated as fluent; @@ -753,7 +753,7 @@ pub(crate) struct BindingsWithVariantName { #[suggestion(code = "{ty_path}::{name}", applicability = "machine-applicable")] pub(crate) suggestion: Option<Span>, pub(crate) ty_path: String, - pub(crate) name: Symbol, + pub(crate) name: Ident, } #[derive(LintDiagnostic)] @@ -797,7 +797,7 @@ pub(crate) struct BorrowOfMovedValue { pub(crate) binding_span: Span, #[label(mir_build_value_borrowed_label)] pub(crate) conflicts_ref: Vec<Span>, - pub(crate) name: Symbol, + pub(crate) name: Ident, pub(crate) ty: String, #[suggestion(code = "ref ", applicability = "machine-applicable")] pub(crate) suggest_borrowing: Option<Span>, |
