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

Possibly handle macros in fold #2888

Closed
catamorphism opened this issue Jul 13, 2012 · 7 comments
Closed

Possibly handle macros in fold #2888

catamorphism opened this issue Jul 13, 2012 · 7 comments
Labels
A-frontend Area: frontend (errors, parsing and HIR) A-syntaxext Area: Syntax extensions

Comments

@catamorphism
Copy link
Contributor

See the item_mac case in fold::noop_fold_item_underscore.

@pnkfelix
Copy link
Member

Not critical for 0.6; de-milestoning

@catamorphism
Copy link
Contributor Author

@jbclements -- does it make sense for the AST fold to visit macros? Or is the current code correct?

@jbclements
Copy link
Contributor

From my perspective: yes, definitely. In particular, I'm going to want ident-folds to hit the idents inside of macro invocations. Could it break code to add this traversal? Well, the only place you're going to see unexpanded macro invocations is prior to expansion, and the only thing inside of macro invocations is tokens, so it seems very unlikely.

To summarize: yes, this fold should visit macro invocations.

@catamorphism
Copy link
Contributor Author

In that case, nominating for milestone 5, production-ready

@graydon
Copy link
Contributor

graydon commented Jun 6, 2013

accepted for production-ready milestone

@jbclements
Copy link
Contributor

I've implemented this in a local branch, I expect to push it soon (next two days)

bors added a commit that referenced this issue Jun 6, 2013
@jbclements
Copy link
Contributor

done, now. FIXME removed downstream.

jbclements added a commit to jbclements/rust that referenced this issue Jun 26, 2013
jbclements added a commit to jbclements/rust that referenced this issue Jul 10, 2013
jbclements added a commit to jbclements/rust that referenced this issue Jul 28, 2013
graydon pushed a commit to graydon/rust that referenced this issue Aug 1, 2013
graydon pushed a commit to graydon/rust that referenced this issue Aug 25, 2013
jbclements added a commit to jbclements/rust that referenced this issue Sep 6, 2013
jbclements added a commit to jbclements/rust that referenced this issue Sep 6, 2013
RalfJung pushed a commit to RalfJung/rust that referenced this issue Jun 3, 2023
TB diagnostics: avoid printing irrelevant events

History contains some events that are relevant to the location but not useful to understand the error.
We can make the selection of events more precise, from only "does it affect the location" to also "is it relevant for this kind of error"

This is also the occasion to fix rust-lang/miri#2867 (comment)

[Solved] Draft: find a way for blanks in the history to not be confusing, as with the current version the history can show the creation as `Reserved` then show where it transitioned from `Frozen` to `Disabled`, but it will say nothing of the `Reserved -> Frozen` leading up to it.
RalfJung pushed a commit to RalfJung/rust that referenced this issue Jun 29, 2023
TB: more fail tests (mostly shared with SB)

Although it was not in the tests, `mem::transmute` works for `UnsafeCell -> &` as well.

Draft: will also introduce more test cases for cases that fail.
Draft: depends on the new error messages from rust-lang#2888
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: frontend (errors, parsing and HIR) A-syntaxext Area: Syntax extensions
Projects
None yet
Development

No branches or pull requests

4 participants