Skip to content

Exporting a rustc_macro_transparency = "opaque" macro from std spams missing stability attribute errors #146993

@Jules-Bertholet

Description

@Jules-Bertholet

I tried this code:

// inside any publicly visible module of `std`
// (not `core` or `alloc`)

#[doc(hidden)] // or any docs you want
#[unstable(feature = "foobar", issue = "none")] // or any stability you want
pub macro foo {() => {},}

I expected to see this happen: It compiles

Instead, this happened: 934 instances of error: ... has missing stability attribute, from items all over std

Meta

stage1 build of 15283f6 (./x build library/std)

@rustbot label requires-nightly requires-internal-features F-staged_api F-decl_macro A-decl-macros-2-0 T-compiler A-hygiene

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)A-hygieneArea: Macro hygieneC-bugCategory: This is a bug.F-decl_macro`#![feature(decl_macro)]`F-staged_api`#![feature(staged_api)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.requires-internal-featuresThis issue requires the use of internal features.requires-nightlyThis issue requires a nightly compiler in some way.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions