-
Notifications
You must be signed in to change notification settings - Fork 13.4k
rustdoc: handle generics better when matching notable traits #108954
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
rustdoc: handle generics better when matching notable traits #108954
Conversation
This commit makes the `clean::Type::is_same` non-commutative, so that a generic `impl` matches a concrete return, but a generic return does not match a concrete `impl`. It makes slice and vector Write for `u8` not match on every generic return value.
r? @jsha (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
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.
Thanks for working on this issue!
r? @camelid |
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.
Thanks again for fixing this!
@bors r+ rollup |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#108954 (rustdoc: handle generics better when matching notable traits) - rust-lang#109203 (refactor/feat: refactor identifier parsing a bit) - rust-lang#109213 (Eagerly intern and check CrateNum/StableCrateId collisions) - rust-lang#109358 (rustc: Remove unused `Session` argument from some attribute functions) - rust-lang#109359 (Update stdarch) - rust-lang#109378 (Remove Ty::is_region_ptr) - rust-lang#109423 (Use region-erased self type during IAT selection) - rust-lang#109447 (new solver cleanup + implement coherence) - rust-lang#109501 (make link clickable) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This commit makes the
clean::Type::is_same
non-commutative (renaming itis_doc_subtype_of
), so that a genericimpl
matches a concrete return, but a generic return does not match a concreteimpl
. It makes slice and vector Write foru8
not match on every generic return value.Fixes #100322
Fixes #55082
Preview: