Exporting a `rustc_macro_transparency = "opaque"` macro from `std` spams `missing stability attribute` errors
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
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 15283f6fe95e5b604273d13a428bab5fc0788f5a (./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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by adding the shown macro to a publicly visible module in std and running the stage1 build command, ./x build library/std. Then trace the stability checking involved in exporting the opaque macro. Done means the std build completes without the reported missing stability attribute errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100