Use macro to make query providers greppable#117360
Use macro to make query providers greppable#117360Noratrieb wants to merge 1 commit intorust-lang:masterfrom
Conversation
|
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
This comment was marked as resolved.
This comment was marked as resolved.
|
rust analyzer works just fine on the RHS. I also made sure to make the macro contain valid rust exprs, letting rustfmt take care of formatting. |
|
☔ The latest upstream changes (presumably #117405) made this pull request unmergeable. Please resolve the merge conflicts. |
|
|
||
| pub fn provide(providers: &mut Providers) { | ||
| *providers = Providers { mir_borrowck, ..*providers }; | ||
| query_provider!(providers, provide(mir_borrowck) = mir_borrowck); |
There was a problem hiding this comment.
What about a simpler query_provide!(mir_borrowck, providers)?
If we need to provide a closure, we add a simple let binding just above.
There was a problem hiding this comment.
Closure inference hates this idea and makes this all really annoying, needing type annotations all over the place. Probably makes more sense to just turn the closures into functions instead, but that's some annoying manual effort that I don't feel like doing right now. Gonna work on this at a later point.
|
@rustbot author |
|
@Noratrieb any updates on this? thanks |
|
Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks |
implements https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/query.20provider.20definitions