about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/errors.rs
diff options
context:
space:
mode:
authorFolkert de Vries <folkert@folkertdev.nl>2025-07-04 23:56:16 +0200
committerFolkert de Vries <folkert@folkertdev.nl>2025-07-13 14:34:40 +0200
commit3689b80b75bb400e740897ec83e64be332098c0d (patch)
treedb23b5f9d95c0f4613ae1599111c0c7c595be85a /compiler/rustc_builtin_macros/src/errors.rs
parent1b0bc594a75dfc1cdedc6c17052cf44de101e632 (diff)
downloadrust-3689b80b75bb400e740897ec83e64be332098c0d.tar.gz
rust-3689b80b75bb400e740897ec83e64be332098c0d.zip
make `cfg_select` a builtin macro
Diffstat (limited to 'compiler/rustc_builtin_macros/src/errors.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/errors.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/src/errors.rs b/compiler/rustc_builtin_macros/src/errors.rs
index a5ee7349fc6..6bcf4d3e0a2 100644
--- a/compiler/rustc_builtin_macros/src/errors.rs
+++ b/compiler/rustc_builtin_macros/src/errors.rs
@@ -954,3 +954,21 @@ pub(crate) struct AsmExpectedOther {
     pub(crate) span: Span,
     pub(crate) is_inline_asm: bool,
 }
+
+#[derive(Diagnostic)]
+#[diag(builtin_macros_cfg_select_no_matches)]
+pub(crate) struct CfgSelectNoMatches {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(builtin_macros_cfg_select_unreachable)]
+pub(crate) struct CfgSelectUnreachable {
+    #[primary_span]
+    #[label(builtin_macros_label2)]
+    pub span: Span,
+
+    #[label]
+    pub wildcard_span: Span,
+}