summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_builtin_macros/src/concat_idents.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /compiler/rustc_builtin_macros/src/concat_idents.rs
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'compiler/rustc_builtin_macros/src/concat_idents.rs')
-rw-r--r--compiler/rustc_builtin_macros/src/concat_idents.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/concat_idents.rs b/compiler/rustc_builtin_macros/src/concat_idents.rs
index 297c604e0..8c737f043 100644
--- a/compiler/rustc_builtin_macros/src/concat_idents.rs
+++ b/compiler/rustc_builtin_macros/src/concat_idents.rs
@@ -6,13 +6,15 @@ use rustc_expand::base::{self, *};
use rustc_span::symbol::{Ident, Symbol};
use rustc_span::Span;
+use crate::errors;
+
pub fn expand_concat_idents<'cx>(
cx: &'cx mut ExtCtxt<'_>,
sp: Span,
tts: TokenStream,
) -> Box<dyn base::MacResult + 'cx> {
if tts.is_empty() {
- cx.span_err(sp, "concat_idents! takes 1 or more arguments");
+ cx.emit_err(errors::ConcatIdentsMissingArgs { span: sp });
return DummyResult::any(sp);
}
@@ -22,7 +24,7 @@ pub fn expand_concat_idents<'cx>(
match e {
TokenTree::Token(Token { kind: token::Comma, .. }, _) => {}
_ => {
- cx.span_err(sp, "concat_idents! expecting comma");
+ cx.emit_err(errors::ConcatIdentsMissingComma { span: sp });
return DummyResult::any(sp);
}
}
@@ -34,7 +36,7 @@ pub fn expand_concat_idents<'cx>(
}
}
- cx.span_err(sp, "concat_idents! requires ident args");
+ cx.emit_err(errors::ConcatIdentsIdentArgs { span: sp });
return DummyResult::any(sp);
}
}