Repository navigation
Suggest gca! for path const args that use generic params - #165035
yashaggarwal85d wants to merge 1 commit into
Conversation
|
HIR ty lowering was modified cc @fmease |
|
rustbot has assigned @JonathanBrouwer. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
FYI, used LLM for writing tests. |
|
r? @khyperia |
|
@JonathanBrouwer that is true, but if there will be any syntax, a suggestion will be needed and the filtering logic will likely be the same, just with different output. I find that spending a little bit of effort to improde diagnostics for nightly features helps set the tone for their maintainers to continue improving them and makes the stabilization rollout smoother because there needs to be less of a mad scramble to improve diagnostics right before or right after. |
|
That makes sense, thanks for sharing! |
Fixes #164999
When a const arg is just a path like
Self::Nand the gca features are on, the error now suggests wrapping it ingca!instead of telling you to make atype constitem:It only fires when both
gca_min_const_itemsandgca_const_itemsare enabled (with just the min feature the wrapped form still errors), and it skipsconst { .. }blocks, non-path expressions, macro spans, and inherent assoc consts, sincegca!doesn't help there yet. Those keep the old help.