Uh oh!
There was an error while loading. Please reload this page.
Do not suggest importing inaccessible items - #88838
Conversation
rust-highfive
commented
Sep 10, 2021
(rust-highfive has picked a reviewer for you, use r? to override) |
michaelwoerister
commented
Sep 14, 2021
r? @JohnTitor (randomly picked someone from wg-diagnostics, feel free to re-assign) |
JohnTitor
commented
Sep 15, 2021
Seems good but I'm not part of t-compiler, r? @estebank could you take a look? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
estebank
left a comment
There was a problem hiding this comment.
I think the changes are an improvement already, but I have a few ideas on how we could improve them further. I'm r=me for the code changes as they are, but I would like to continue tweaking them so the output is nicer. Would you have time to make them perfect, @FabianWolff?
FabianWolff
commented
Sep 15, 2021
Thanks for the review! Yes, I'll try to implement your suggestions (though I won't get around to it today). |
bors
commented
Sep 17, 2021
☔ The latest upstream changes (presumably #89037) made this pull request unmergeable. Please resolve the merge conflicts. |
estebank
commented
Sep 17, 2021
One last thing: if the |
434c694 to
82e54abCompareFabianWolff
commented
Sep 17, 2021
@estebank I have now implemented your suggestions! I did not get around to your proposal in #88838 (comment); instead, I have opened #89057 as a follow-up, as you have suggested (I might come back to it if I have time in the next few days). |
bors
commented
Sep 26, 2021
☔ The latest upstream changes (presumably #89262) made this pull request unmergeable. Please resolve the merge conflicts. |
crlf0710
commented
Sep 26, 2021
I'm curious whether this will fix #88636 too |
estebank
commented
Sep 26, 2021
@crlf0710 it's very likely it will, good catch! |
82e54ab to
750018eCompareFabianWolff
commented
Sep 26, 2021
@estebank Rebased & ready. |
estebank
commented
Sep 27, 2021
@bors r+ |
bors
commented
Sep 27, 2021
📌 Commit 750018e has been approved by |
bors
commented
Sep 28, 2021
⌛ Testing commit 750018e with merge 93468f041e3a0ab409c395d2cbf7a790e4c8ff8c... |
bors
commented
Sep 28, 2021
💥 Test timed out |
rust-log-analyzer
commented
Sep 28, 2021
estebank
commented
Sep 28, 2021
@bors retry |
…arth Rollup of 7 pull requests Successful merges: - rust-lang#88838 (Do not suggest importing inaccessible items) - rust-lang#89251 (Detect when negative literal indices are used and suggest appropriate code) - rust-lang#89321 (Rebase resume argument projections during state transform) - rust-lang#89327 (Pick one possible lifetime in case there are multiple choices) - rust-lang#89344 (Cleanup lower_generics_mut and make span be the bound itself) - rust-lang#89397 (Update `llvm` submodule to fix function name mangling on x86 Windows) - rust-lang#89412 (Add regression test for issues rust-lang#88969 and rust-lang#89119 ) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Do not mention a reexported item if it's private Fixesrust-lang#90113 The _actual_ regression was introduced in rust-lang#73652, then rust-lang#88838 made it worse. This fixes the issue by not counting such an import as a candidate.
Fixes#88472. For this example:
rustc currently emits:
this is incorrect, as applying this suggestion leads to
With my changes, I get:
As for the wildcard mentioned in #88472, I would argue that the warning is actually correct, since the import is unused. I think the real issue is the wrong suggestion, which I have fixed here.