Skip to content

Using the quote_tokens!() macro results in unresolved ext_cx errors #6040

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
colemickens opened this issue Apr 24, 2013 · 2 comments
Closed

Comments

@colemickens
Copy link
Contributor

This is predicated on the notion that I'm not trying to quote_tokens! horribly incorrectly.

cole@medusa ⮀ ~/Code/rustpkgs/colemickens/quote ⮀ cat quote_test.rs

extern mod std;
extern mod syntax;

fn main() {
    quote_tokens!(
        these.are_some(balling_tokens)
    )
}

cole@medusa ⮀ ~/Code/rustpkgs/colemickens/quote ⮀ rustc quote_test.rs

quote_test.rs:5:1: 1:0 error: unresolved name: `ext_cx`.
note: in expansion of quote_tokens!
quote_test.rs:5:1: 1:0 note: expansion site
quote_test.rs:6:2: 6:7 error: unresolved name: `ext_cx`. Did you mean: `tt`?
quote_test.rs:6                 these.are_some(balling_tokens)
                                ^~~~~
note: in expansion of quote_tokens!
quote_test.rs:5:1: 1:0 note: expansion site
quote_test.rs:6:8: 6:16 error: unresolved name: `ext_cx`. Did you mean: `tt`?
quote_test.rs:6                 these.are_some(balling_tokens)
                                      ^~~~~~~~
note: in expansion of quote_tokens!
quote_test.rs:5:1: 1:0 note: expansion site
quote_test.rs:6:17: 6:31 error: unresolved name: `ext_cx`. Did you mean: `tt`?
quote_test.rs:6                 these.are_some(balling_tokens)
                                               ^~~~~~~~~~~~~~
note: in expansion of quote_tokens!
quote_test.rs:5:1: 1:0 note: expansion site
error: aborting due to 4 previous errors
@metajack
Copy link
Contributor

Still happens.

@jbclements is this worth nominating?

@jbclements
Copy link
Contributor

No, I don't think so. I'm sorry I didn't see this one earlier. The answer is that quote_tokens is currently written in such a way that it
a) is cloaking(/unhygienic), and
b) requires an in-scope variable named ext_cx
This is very nasty, in my opinion. It's probably worth opening an issue called "rewrite quote_tokens (etc.) to not be so icky". However, this is not a bug, per se.
I'll open an issue on that, and close this one.

flip1995 pushed a commit to flip1995/rust that referenced this issue Sep 24, 2020
…askrgr

clarify margin of error in wording of float comparison operator lint messages

fixes rust-lang#6040

changelog: change wording of float comparison operator to make margin of error less ambiguous
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