Skip to content

Hygiene issues when reparsing token trees #16987

@uorbe001

Description

@uorbe001

I get errors when I call to_tokens on a parsed block and parse that again using procedural macros. It seems to be related to hygiene being lost when you do that, but I might be wrong, here's a gist that shows the problem: https://gist.github.com/uorbe001/1118f22c378d2e382d29

If I try to compile that gist, I get the following error on the assert! line:

<quote expansion>:4:50: 4:53 error: unresolved name `one`.
<quote expansion>:4                          name_66,ctxt_2!(1i == one);

I thought this was related to #8063, but apparently this is a separate issue.

Activity

uorbe001

uorbe001 commented on Sep 10, 2014

@uorbe001
Author

I forgot to mention, this seems to have been introduced with #16477

added a commit that references this issue on Mar 5, 2015
239775c
added 3 commits that reference this issue on Mar 10, 2015
ce0a295
5b8312d
2a7c548
added a commit that references this issue on Apr 9, 2015
ec6db72
added a commit that references this issue on Apr 19, 2015
ec1b84c
added 2 commits that reference this issue on Apr 23, 2015
d653477
7691bce
added 2 commits that reference this issue on Apr 24, 2015
dac0f82
2d9831d
added a commit that references this issue on Apr 26, 2015
6365080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-syntaxextArea: Syntax extensions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @uorbe001@huonw

      Issue actions

        Hygiene issues when reparsing token trees · Issue #16987 · rust-lang/rust