Those test contain builtin macros that were not correctly defined. This
was mostly fine because the compiler emitted attribute errors before the
expansion step but now that the new builtin attribute checking is
executed after the expansion we cannot ignore those missing definitions.
gcc/testsuite/ChangeLog:
* rust/compile/doc_macro.rs: Add concat builtin macro definition.
* rust/compile/early_feature_gate_in_macro.rs: Add stringify builtin
macro definition.
* rust/compile/issue-3661.rs: Likewise.
* rust/compile/parse_time_feature_gate.rs: Add concat and stringify
builtin macro definition.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
+#![feature(rustc_attrs)]
#![feature(no_core)]
#![no_core]
#![feature(extended_key_value_attributes)]
#![doc = concat!("AB")]
+
+#[rustc_builtin_macro]
+macro_rules! concat {
+ () => {{}};
+}
() => {{}};
}
+#[rustc_builtin_macro]
+macro_rules! stringify {
+ () => {{}};
+}
+
macro_rules! prefix_symbol(
($prefix : tt, { $($ident: ident, )* }) => {
$(
#![feature(no_core)]
#![no_core]
#![feature(extended_key_value_attributes)]
+#![feature(rustc_attrs)]
+
+#[rustc_builtin_macro]
+macro_rules! stringify {
+ () => {{}};
+}
pub macro m($inner_str:expr) {
- #[m = $inner_str]
+ #[m = $inner_str]
// { dg-error "macro not found" "" { target *-*-* } .-1 }
struct S;
#![feature(no_core)]
#![no_core]
+#![feature(rustc_attrs)]
+
+#[rustc_builtin_macro]
+macro_rules! concat {
+ () => {{}};
+}
+
+#[rustc_builtin_macro]
+macro_rules! stringify {
+ () => {{}};
+}
// { dg-error "arbitrary expressions in key-value attributes are unstable" "" { target *-*-* } .+1 }
#[export_name = concat!(stringify!(non), stringify!(literal))]