Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.

Concatenated identifier may not refer to a captured local variable #6

Open
dtolnay opened this issue Jul 9, 2018 · 0 comments
Open

Comments

@dtolnay
Copy link
Owner

dtolnay commented Jul 9, 2018

This is a consequence of hygiene rules.

#[macro_use]
extern crate mashup;

fn main() {
    let yy = 0;

    mashup! {
        m["y"] = y y;
    }

    m! {
        println!("{}", "y");
    }
}
error[E0425]: cannot find value `yy` in this scope
  --> src/main.rs:11:5
   |
11 | /     m! {
12 | |         println!("{}", "y");
13 | |     }
   | |_____^ not found in this scope
   |
   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant