-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
syntax: Remove warning for unnecessary path disambiguators #57565
Conversation
5431e7b
to
9f66ed6
Compare
@rfcbot fcp merge There used to be a hard-coded warning for unnecessary |
Team member @nikomatsakis has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
I feel that this style is distinctly unidiomatic and would therefore fit well into |
@petrochenkov question -- can we set a flag in the resulting AST to indicate that an unnecessary |
I'm still happy for rustfmt to silently normalize, but @cramertj feels like there is value in having a "teachable moment" here -- but it'd be nice if it were rustfix'able or something like that. I can certainly see that. |
Ugh, we can but that would at least increase the size of every path segment in AST. The hardcoded warning can be converted into a lint without extending AST, but it will be attached to the crate root and only could be |
Sure, but that seems pretty surprising. I guess it could be considered a long-standing bug. Presumably we could do something where we record the span, too, and try to reproduce the node-id from that. |
To be clear, I don't know that it's worth the effort. |
Particularly not if we adopt the "remove turbofish" RFC, in which case... nobody would likely think to add |
This comment has been minimized.
This comment has been minimized.
🔔 This is now entering its final comment period, as per the review above. 🔔 |
The final comment period, with a disposition to merge, as per the review above, is now complete. |
ping from triage @petrochenkov you have a conflict to resolve |
Rebased. |
This comment has been minimized.
This comment has been minimized.
ping from triage @petrochenkov more conflicts :D (maybe ask for a r+ before more conflicts arise) |
@Dylan-DPC |
@petrochenkov true though, but i have seen some reviewers wait for conflicts to be resolved before reviewing (especially if the conflict relates to the change being made). Yeah i know the label is for that, but sometimes reviewers oversee that and won't check a PR until they are pinged or there is a discussion somewhere. |
This comment has been minimized.
This comment has been minimized.
📌 Commit 4b38294 has been approved by |
syntax: Remove warning for unnecessary path disambiguators `rustfmt` is now stable and it removes unnecessary turbofishes, so removing the warning as discussed in rust-lang#43540 (where it was introduced). One hardcoded warning less. Closes rust-lang#58055 r? @nikomatsakis
syntax: Remove warning for unnecessary path disambiguators `rustfmt` is now stable and it removes unnecessary turbofishes, so removing the warning as discussed in rust-lang#43540 (where it was introduced). One hardcoded warning less. Closes rust-lang#58055 r? @nikomatsakis
syntax: Remove warning for unnecessary path disambiguators `rustfmt` is now stable and it removes unnecessary turbofishes, so removing the warning as discussed in rust-lang#43540 (where it was introduced). One hardcoded warning less. Closes rust-lang#58055 r? @nikomatsakis
syntax: Remove warning for unnecessary path disambiguators `rustfmt` is now stable and it removes unnecessary turbofishes, so removing the warning as discussed in rust-lang#43540 (where it was introduced). One hardcoded warning less. Closes rust-lang#58055 r? @nikomatsakis
Rollup of 18 pull requests Successful merges: - #57293 (Make some lints incremental) - #57565 (syntax: Remove warning for unnecessary path disambiguators) - #58253 (librustc_driver => 2018) - #58837 (librustc_interface => 2018) - #59268 (Add suggestion to use `&*var` when `&str: From<String>` is expected) - #59283 (Make ASCII case conversions more than 4× faster) - #59284 (adjust MaybeUninit API to discussions) - #59372 (add rustfix-able suggestions to trim_{left,right} deprecations) - #59390 (Make `ptr::eq` documentation mention fat-pointer behavior) - #59393 (Refactor tuple comparison tests) - #59420 ([CI] record docker image info for reuse) - #59421 (Reject integer suffix when tuple indexing) - #59430 (Renames `EvalContext` to `InterpretCx`) - #59439 (Generalize diagnostic for `x = y` where `bool` is the expected type) - #59449 (fix: Make incremental artifact deletion more robust) - #59451 (Add `Default` to `std::alloc::System`) - #59459 (Add some tests) - #59460 (Include id in Thread's Debug implementation) Failed merges: r? @ghost
rustfmt
is now stable and it removes unnecessary turbofishes, so removing the warning as discussed in #43540 (where it was introduced).One hardcoded warning less.
Closes #58055
r? @nikomatsakis