Skip to content

Commit 8a8b31a

Browse files
committed
compiler: Make Externally Implementable Item (eii) macros "semiopaque"
Otherwise eiis defined by std will produce large amounts of `missing stability attribute` errors.
1 parent 44a5b55 commit 8a8b31a

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_builtin_macros/src

1 file changed

+3
-0
lines changed

compiler/rustc_builtin_macros/src/eii.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,9 @@ fn generate_attribute_macro_to_implement(
425425
// errors for eii's in std.
426426
macro_attrs.extend_from_slice(attrs_from_decl);
427427

428+
// Avoid "missing stability attribute" errors for eiis in std. See #146993.
429+
macro_attrs.push(ecx.attr_name_value_str(sym::rustc_macro_transparency, sym::semiopaque, span));
430+
428431
// #[builtin_macro(eii_shared_macro)]
429432
macro_attrs.push(ecx.attr_nested_word(sym::rustc_builtin_macro, sym::eii_shared_macro, span));
430433

0 commit comments

Comments
 (0)