Skip to content

#[macro_export(hello, world)] #107231

Closed
@SoniEx2

Description

@SoniEx2

I tried this code:

#[macro_export(hello, world)]
macro_rules! foo {
    () => {}
}

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=9c40221c498bdc99beb7022d53fdb086

I expected to see this happen: it shouldn't compile

Instead, this happened: it compiles

Meta

rustc --version --verbose:

N/A
Backtrace

<backtrace>

Metadata

Metadata

Assignees

Labels

A-attributesArea: Attributes (`#[…]`, `#![…]`)C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions