-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Confusing not trait
error message
#10361
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
Comments
If |
That's covered in #8767. |
Just tried this out, the error is identical today. |
This error is much better:
I'm going to consider this one closed. |
Jarcho
pushed a commit
to Jarcho/rust
that referenced
this issue
Feb 26, 2023
Stop bytes_nth from suggesting code that does not compile Fixes rust-lang#10151 As discussed in the issue, this PR changes the lint in 2 ways 1. Replace `bytes().nth(n).unwrap()` with `as_bytes()[n]` 2. Replace other `bytes().nth(n)` with `as_bytes().get(n).copied()` --- changelog: Stop bytes_nth from suggesting code that does not compile in some cases
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should show better error message. If
trait T
is not in mod, rustc prints "duplicate definition of moduleT
".The text was updated successfully, but these errors were encountered: