-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Diagnostic when a trait is not in scope no longer tells you to add a use, instead tells you to box the receiver. #84272
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
5225225
added
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
Apr 17, 2021
cc @estebank |
jyn514
added
the
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
label
Apr 17, 2021
rustbot
added
the
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
label
Apr 17, 2021
Removing this early return would likely give you the suggestion, but given the current state of the code, I'm not sure we can give the "always correct" suggestion. |
Assigning |
Stupremee
added
P-high
High priority
and removed
I-prioritize
Issue: Indicates that prioritization has been requested for this issue.
labels
Apr 19, 2021
I have a fix for this in #84499. |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 25, 2021
Tweak trait not `use`d suggestion Fix rust-lang#84272. Follow up to rust-lang#83667.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 25, 2021
Tweak trait not `use`d suggestion Fix rust-lang#84272. Follow up to rust-lang#83667.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Apr 25, 2021
Tweak trait not `use`d suggestion Fix rust-lang#84272. Follow up to rust-lang#83667.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
P-high
High priority
regression-from-stable-to-nightly
Performance or correctness regression from stable to nightly.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Given the following code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=057c1715bd0bea7866420e59e5a070f1
The current (
nightly
) output is:On stable, there was a line telling you which trait you need to import in order to call the function.
Also, boxing the object here isn't helpful, so it shouldn't be suggested.
Bisected this, and I'm assuming that the relevant issue is #83667, but I'm not sure how I would verify that.
searched nightlies: from nightly-2021-03-30 to nightly-2021-03-31
regressed nightly: nightly-2021-03-31
searched commits: from 48691ea to 74874a6
regressed commit: 16156fb
bisected with cargo-bisect-rustc v0.6.0
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
(where test.sh is
)
The text was updated successfully, but these errors were encountered: