-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)A-hygieneArea: Macro hygieneArea: Macro hygieneC-bugCategory: This is a bug.Category: This is a bug.F-decl_macro`#![feature(decl_macro)]``#![feature(decl_macro)]`F-staged_api`#![feature(staged_api)]``#![feature(staged_api)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.This issue may need triage. Remove it if it has been sufficiently triaged.requires-internal-featuresThis issue requires the use of internal features.This issue requires the use of internal features.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.
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 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
Labels
A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)Area: Declarative macros 2.0 (#39412)A-hygieneArea: Macro hygieneArea: Macro hygieneC-bugCategory: This is a bug.Category: This is a bug.F-decl_macro`#![feature(decl_macro)]``#![feature(decl_macro)]`F-staged_api`#![feature(staged_api)]``#![feature(staged_api)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant 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.This issue may need triage. Remove it if it has been sufficiently triaged.requires-internal-featuresThis issue requires the use of internal features.This issue requires the use of internal features.requires-nightlyThis issue requires a nightly compiler in some way.This issue requires a nightly compiler in some way.