about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2022-09-14 20:11:42 +0200
committerXiretza <xiretza@xiretza.xyz>2022-09-27 20:29:19 +0200
commit37fdcb4b364aeb8164a21a39dac984eb1e772872 (patch)
tree7ce85ec9dc7125bdb6705362b0941d86b7ace02c /compiler/rustc_parse/src/errors.rs
parentcaefac034e55b3cd0568a493c85308e1fc518cda (diff)
downloadrust-37fdcb4b364aeb8164a21a39dac984eb1e772872.tar.gz
rust-37fdcb4b364aeb8164a21a39dac984eb1e772872.zip
Don't unnecessarily stringify paths in diagnostics
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index f10b178049b..3d364a956d3 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -1,3 +1,4 @@
+use rustc_ast::Path;
 use rustc_errors::{fluent, AddToDiagnostic, Applicability, EmissionGuarantee, IntoDiagnostic};
 use rustc_macros::{Diagnostic, Subdiagnostic};
 use rustc_session::errors::ExprParenthesesNeeded;
@@ -536,7 +537,7 @@ pub(crate) struct ComparisonInterpretedAsGeneric {
     #[primary_span]
     #[label(parser::label_comparison)]
     pub comparison: Span,
-    pub typename: String,
+    pub r#type: Path,
     #[label(parser::label_args)]
     pub args: Span,
     #[subdiagnostic]
@@ -549,7 +550,7 @@ pub(crate) struct ShiftInterpretedAsGeneric {
     #[primary_span]
     #[label(parser::label_comparison)]
     pub shift: Span,
-    pub typename: String,
+    pub r#type: Path,
     #[label(parser::label_args)]
     pub args: Span,
     #[subdiagnostic]
@@ -597,7 +598,7 @@ pub(crate) struct LeadingPlusNotSupported {
 pub(crate) struct ParenthesesWithStructFields {
     #[primary_span]
     pub span: Span,
-    pub name: String,
+    pub r#type: Path,
     #[subdiagnostic]
     pub braces_for_struct: BracesForStructLiteral,
     #[subdiagnostic]