-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
rustdoc: Negative impls are not notable #125134
rustdoc: Negative impls are not notable #125134
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we need the positive test because we have a bunch of them already (rg 'notable-traits-data' test/rustdoc
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't hurt to show that a negative impl doesn't disqualify the positive impl though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good. I'm surprised too see that we do a bunch of similar logic in notable_traits_{decl,button}
. Ideally, you wouldn't've need to update two places. Anyway, I would need to look into that a bit deeper so see if that could be avoided through a refactor.
Thanks! @bors r+ rollup |
☀️ Test successful - checks-actions |
Finished benchmarking commit (b21b74b): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 678.357s -> 680.309s (0.29%) |
(perf regressions spurious, not in |
In #124097, we add
impl !Iterator for [T]
for coherence reasons, and sinceIterator
is a notable trait, this means that all-> &[_]
now are tagged with a!Iterator
impl as a notable trait.I "fixed" the failing tests in that PR with 6cbbb8b, where I just blessed the tests, since I didn't want to mix these changes with that PR; however, don't believe negative impls are notable, and this PR aims to prevent these impls from being mentioned.
In the standard library, we use negative impls purely to guide coherence. They're not really a signal of anything useful to the end-user. If there ever is a case that we want negative impls to be mentioned as notable, this really should be an opt-in feature.