-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Error suggests implementing private trait instead of importing it. #57457
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-trait-system
Area: Trait system
A-visibility
Area: Visibility / privacy
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
estebank
added
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
labels
Jan 6, 2020
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Feb 27, 2020
Add more context to E0599 errors Point at the intermediary unfulfilled trait bounds. Fix rust-lang#52523, fix rust-lang#61661, cc rust-lang#36513, fix rust-lang#68131, fix rust-lang#64417, fix rust-lang#61768, cc rust-lang#57457, cc rust-lang#9082, fix rust-lang#57994, cc rust-lang#64934, cc rust-lang#65149.
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this issue
Feb 28, 2020
Add more context to E0599 errors Point at the intermediary unfulfilled trait bounds. Fix rust-lang#52523, fix rust-lang#61661, cc rust-lang#36513, fix rust-lang#68131, fix rust-lang#64417, fix rust-lang#61768, cc rust-lang#57457, cc rust-lang#9082, fix rust-lang#57994, cc rust-lang#64934, cc rust-lang#65149.
bors
added a commit
that referenced
this issue
Feb 29, 2020
crlf0710
added
the
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
label
Jun 11, 2020
We still don't check for accessibility. |
estebank
added
A-trait-system
Area: Trait system
A-visibility
Area: Visibility / privacy
labels
Sep 10, 2021
Triage: no change |
estebank
added a commit
to estebank/rust
that referenced
this issue
Oct 17, 2023
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Oct 30, 2023
Detect when trait is implemented for type and suggest importing it Fix rust-lang#57457.
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Oct 30, 2023
Rollup merge of rust-lang#116862 - estebank:issue-57457, r=oli-obk Detect when trait is implemented for type and suggest importing it Fix rust-lang#57457.
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
A-trait-system
Area: Trait system
A-visibility
Area: Visibility / privacy
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
D-newcomer-roadblock
Diagnostics: Confusing error or lint; hard to understand for new users.
D-papercut
Diagnostics: An error or lint that needs small tweaks.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
If I implement a private trait on a public struct, then use a trait method elsewhere, the diagnostic message suggests implementing the already implemented private trait instead of making the trait public and importing it. For example, this code:
Results in this diagnostic:
The note should suggest making
m::T
public anduse
ing it at the top level.The text was updated successfully, but these errors were encountered: