about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@dend.ro>2025-02-17 13:20:12 +0200
committerLaurențiu Nicola <lnicola@dend.ro>2025-02-17 13:20:12 +0200
commitb571e8a8aca9e22834a80cd8bff13ef311b447a1 (patch)
tree34845c6ebfef9cb3705f610783a2b6da4a275b5b /compiler/rustc_interface/src/errors.rs
parent19fa3deab30f89b0c5fb0b7144a074d95a35ab5e (diff)
parent273465e1f2932a30a5b56ac95859cdc86f3f33fa (diff)
downloadrust-b571e8a8aca9e22834a80cd8bff13ef311b447a1.tar.gz
rust-b571e8a8aca9e22834a80cd8bff13ef311b447a1.zip
Merge from rust-lang/rust
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
-rw-r--r--compiler/rustc_interface/src/errors.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/errors.rs b/compiler/rustc_interface/src/errors.rs
index b62950d6709..ca4e556dcdb 100644
--- a/compiler/rustc_interface/src/errors.rs
+++ b/compiler/rustc_interface/src/errors.rs
@@ -5,6 +5,21 @@ use rustc_macros::Diagnostic;
 use rustc_span::{Span, Symbol};
 
 #[derive(Diagnostic)]
+#[diag(interface_crate_name_does_not_match)]
+pub(crate) struct CrateNameDoesNotMatch {
+    #[primary_span]
+    pub(crate) span: Span,
+    pub(crate) crate_name: Symbol,
+    pub(crate) attr_crate_name: Symbol,
+}
+
+#[derive(Diagnostic)]
+#[diag(interface_crate_name_invalid)]
+pub(crate) struct CrateNameInvalid<'a> {
+    pub(crate) crate_name: &'a str,
+}
+
+#[derive(Diagnostic)]
 #[diag(interface_ferris_identifier)]
 pub struct FerrisIdentifier {
     #[primary_span]
@@ -112,3 +127,13 @@ pub(crate) struct AbiRequiredTargetFeature<'a> {
     pub feature: &'a str,
     pub enabled: &'a str,
 }
+
+#[derive(Diagnostic)]
+#[diag(interface_limit_invalid)]
+pub(crate) struct LimitInvalid<'a> {
+    #[primary_span]
+    pub span: Span,
+    #[label]
+    pub value_span: Span,
+    pub error_str: &'a str,
+}