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

Can't use quasiquoter from libsyntax #3001

Closed
eholk opened this issue Jul 23, 2012 · 1 comment
Closed

Can't use quasiquoter from libsyntax #3001

eholk opened this issue Jul 23, 2012 · 1 comment

Comments

@eholk
Copy link
Contributor

eholk commented Jul 23, 2012

The problem seems to be that the quasiquoter generates absolute paths, which means syntax::ext::qquote is not legal inside of libsyntax. We can probably fix this by generating paths relative to syntax::ext::qquote and requiring the user to be sure qquote is in scope when needed.

@eholk
Copy link
Contributor Author

eholk commented Jul 23, 2012

Nervmind, auto_serialize does it. Here's the magic:

// Transitional reexports so qquote can find the paths it is looking for
mod syntax {
    import ext;
    export ext;
    import parse;
    export parse;
}

@eholk eholk closed this as completed Jul 23, 2012
bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
propagate errors about failing to rewrite a macro
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 6, 2023
add some interesting tests for alignment corner cases

`strange_enum_discriminant_offset` example found in rust-lang#53998.
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

1 participant