Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extern crate foo as core breaks resolution in macros #64364

Closed
tmandry opened this issue Sep 10, 2019 · 1 comment
Closed

extern crate foo as core breaks resolution in macros #64364

tmandry opened this issue Sep 10, 2019 · 1 comment

Comments

@tmandry
Copy link
Member

tmandry commented Sep 10, 2019

Broken in a recent nightly. Reproducer (playground):

extern crate futures as core;

fn bar() {
    let _ = format!("{}", 42);
}

Gives the following:

error[E0433]: failed to resolve: could not find `format_args` in `core`
 --> src/lib.rs:4:13
  |
4 |     let _ = format!("{}", 42);
  |             ^^^^^^^^^^^^^^^^^ could not find `format_args` in `core`
  |
  = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)

I've also observed this if a crate is named core and gets used without any extern crate items.

modules named core do not trigger this, only crates.

Seen in the wild: gfx-rs/gfx#2964

@tmandry tmandry changed the title extern crate foo as core breaks format macros extern crate foo as core breaks resolution in macros Sep 10, 2019
@petrochenkov
Copy link
Contributor

Duplicate of #63687, fixed in #64060.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants