Skip to content

able to invoke unstable macro 2.0 #34079

@durka

Description

@durka
Contributor

Stability checking for macro_rules! was fixed in #48524, but uses of declarative macros 2.0 (macro items) are still not checked for stability.

ORIGINAL ISSUE:

Why does this compile?

fn main() {
    __thread_local_inner!(i32, 42);
}

__thread_local_inner is marked #[unstable(...)] #[allow_internal_unstable].

Activity

petrochenkov

petrochenkov commented on Jun 4, 2016

@petrochenkov
Contributor

Because macros are not checked for stability!
At least this was the case when I made stability annotations on public macros mandatory in hopes of a better future.

added
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
A-stabilityArea: `#[stable]`, `#[unstable]` etc.
on Jun 6, 2016
jseyfried

jseyfried commented on Jun 10, 2016

@jseyfried
Contributor

cc me

self-assigned this
on Jan 23, 2017
abonander

abonander commented on Feb 25, 2018

@abonander
Contributor

I'm looking into implementing this, however are we just looking at macro_rules! macros for now or proc-macro and syntax extension invocations as well?

cc @nrc

added a commit that references this issue on Mar 1, 2018

Auto merge of #48524 - abonander:check-macro-stability, r=<try>

72f3e7d
petrochenkov

petrochenkov commented on Mar 16, 2018

@petrochenkov
Contributor

@abonander
I'm reopening this because macros 2.0 (macro items) are not checked for stability yet.

10 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-decl-macros-2-0Area: Declarative macros 2.0 (#39412)A-stabilityArea: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Participants

    @steveklabnik@durka@abonander@Mark-Simulacrum@petrochenkov

    Issue actions

      able to invoke unstable macro 2.0 · Issue #34079 · rust-lang/rust