Skip to content

Calling macros with full paths doesn't work with implicit crates #52576

Closed
@Manishearth

Description

@Manishearth
// edition = "2018"
// [dependencies] lazy_static = "1.0.1"

#![feature(rustc_2018_preview)]
#![feature(use_extern_macros)]
lazy_static::lazy_static! {static ref FOO: u8 = 1;}

This fails to compile (even with extern crate lazy_static). It does compile if I add a use lazy_static.

AIUI this is a bug, you should be able to import directly from crates in macros as well.

cc @dtolnay @alexcrichton

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions