{"test_case", MacroBuiltin::sorry},
{"global_allocator", MacroBuiltin::sorry},
{"cfg_accessible", MacroBuiltin::sorry},
+ {"rustc_const_stable", MacroBuiltin::sorry},
+ {"rustc_const_unstable", MacroBuiltin::sorry},
/* Derive builtins do not need a real transcriber, but still need one. It
should however never be called since builtin derive macros get expanded
differently, and benefit from knowing on what kind of items they are
= "rustc_inherit_overflow_checks";
static constexpr auto &STABLE = "stable";
static constexpr auto &UNSTABLE = "unstable";
+ static constexpr auto &RUSTC_CONST_STABLE = "rustc_const_stable";
+ static constexpr auto &RUSTC_CONST_UNSTABLE = "rustc_const_unstable";
};
} // namespace Values
} // namespace Rust
{Attrs::RUSTC_DEPRECATED, STATIC_ANALYSIS},
{Attrs::RUSTC_INHERIT_OVERFLOW_CHECKS, CODE_GENERATION},
{Attrs::STABLE, STATIC_ANALYSIS},
- {Attrs::UNSTABLE, STATIC_ANALYSIS}};
+ {Attrs::UNSTABLE, STATIC_ANALYSIS},
+ // assuming we keep these for static analysis
+ {Attrs::RUSTC_CONST_STABLE, STATIC_ANALYSIS},
+ {Attrs::RUSTC_CONST_UNSTABLE, STATIC_ANALYSIS}};
BuiltinAttributeMappings *
BuiltinAttributeMappings::get ()
+#![feature(rustc_attrs)]
+
#[rustc_const_stable(feature = "const_ascii_ctype_on_intrinsics", since = "1.47.0")]
-pub fn foo() {} // { dg-error "macro not found" "" { target *-*-* } .-1 }
+pub fn foo() {}
--- /dev/null
+#![feature(rustc_attrs)]
+
+#[rustc_const_unstable(feature = "const_ascii_ctype_on_intrinsics", issue = "1234")]
+pub fn foo() {}