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

change define_maps! syntax to include fn preceding $name #44161

Closed
durka opened this issue Aug 29, 2017 · 2 comments
Closed

change define_maps! syntax to include fn preceding $name #44161

durka opened this issue Aug 29, 2017 · 2 comments

Comments

@durka
Copy link
Contributor

durka commented Aug 29, 2017

In this macro:

macro_rules! define_maps {
(<$tcx:tt>
$($(#[$attr:meta])*
[$($modifiers:tt)*] $name:ident: $node:ident($K:ty) -> $V:ty,)*) => {

This will make it easier to grep for a symbol without knowing whether it is a regular function or a query.

Also consider changing the name from define_maps! to define_queries! (and the module name as well?).

As discussed on IRC with @eddyb and @nikomatsakis.

@durka
Copy link
Contributor Author

durka commented Aug 30, 2017

There is this $modifiers thing, but it seems to be always empty in the current usage of define_maps!. Is it an artifact of history that should be removed?

@nikomatsakis
Copy link
Contributor

@durka my expectation is still that we will use it, that's why it's not been removed yet, but I'm also ok removing it and adding it back later when we want it.

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

2 participants