-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add needless_maybe_sized
lint
#10632
Conversation
r? @giraffate (rustbot has picked a reviewer for you, use r? to override) |
0220b55
to
5b81677
Compare
r? Jarcho I'm not sure if the trace with spans is really worth it. It takes up a lot space and most of the info is not very useful. Is there a way to just print the location without the snippet? One extension would be to check if any of the traits have functions using trait T {
fn foo() -> Self;
} There's no |
I don't think there is a way to keep the location while hiding the snippet, but we could make them regular notes |
☔ The latest upstream changes (presumably #12259) made this pull request unmergeable. Please resolve the merge conflicts. |
5b81677
to
0bc60dc
Compare
I ditched the spans for the trace, doesn't have the location but it seems fine to me. Most of the time it should be clear which traits are the cause but if not the user can always follow the bounds themselves |
Too bad there's no option for printing spans like that. |
Been a week without objections. Getting the spans printed nicely isn't a blocker and can be added in later. @bors r+ |
Add `needless_maybe_sized` lint changelog: new lint: [`needless_maybe_sized`] Closes #10600
💔 Test failed - checks-action_dev_test |
0bc60dc
to
cf0b55e
Compare
getting blocked by @Jarcho, could you retry running the tests so this can get through? |
@bors r+ |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: new lint: [
needless_maybe_sized
]Closes #10600