Skip to content

"note: this error originates in a macro from the standard library" but it's just an extern crate #36469

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

Closed
durka opened this issue Sep 14, 2016 · 1 comment · Fixed by #36498

Comments

@durka
Copy link
Contributor

durka commented Sep 14, 2016

I created two crates, exported a macro from one to the other, and invoked the macro in the latter. The macro expands to code that doesn't compile. The error is:

error[E0425]: unresolved name `Wrong`
 --> src/lib.rs:6:9
  |
6 |         a!();
  |         ^^^^^
  |
  = note: this error originates in a macro from the standard library

error: aborting due to previous error

error: Could not compile `b`.

But the macro isn't in the standard library; rather it's in a crate that I imported.

rustc 1.13.0-nightly (923bac459 2016-09-06)
binary: rustc
commit-hash: 923bac45964940c56ab1075fb7980896de1eb620
commit-date: 2016-09-06
host: x86_64-apple-darwin
release: 1.13.0-nightly

cc @jonathandturner

@sophiajt
Copy link
Contributor

Good catch. Updated in #36498

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Sep 23, 2016
…komatsakis

Fix wording for out-of-crate macro error

This fixes the wording of the note for out-of-crate macro errors to fix rust-lang#36469

The previous wording came from older logic in the PR that was replaced without updating the note.
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

Successfully merging a pull request may close this issue.

2 participants