about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2025-02-17 06:37:35 +0100
committerGitHub <noreply@github.com>2025-02-17 06:37:35 +0100
commit0c051c819638b2d39915f6a50858d2433e65d758 (patch)
tree4085e3044790a1a6f7bdcf4211b1ed5c166aad05 /compiler/rustc_interface/src/errors.rs
parentf3a4f1a02ae83b471916f61d3fc8ccfe7cbcf869 (diff)
parent7a8c0fc117a4d866ea0c362cc173f90c7bf14dd6 (diff)
downloadrust-0c051c819638b2d39915f6a50858d2433e65d758.tar.gz
rust-0c051c819638b2d39915f6a50858d2433e65d758.zip
Rollup merge of #136671 - nnethercote:middle-limits, r=Nadrieril
Overhaul `rustc_middle::limits`

In particular, to make `pattern_complexity` work more like other limits, which then enables some other simplifications.

r? ``@Nadrieril``
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
-rw-r--r--compiler/rustc_interface/src/errors.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/errors.rs b/compiler/rustc_interface/src/errors.rs
index c3b858d4f2e..ca4e556dcdb 100644
--- a/compiler/rustc_interface/src/errors.rs
+++ b/compiler/rustc_interface/src/errors.rs
@@ -127,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,
+}