rustdoc: Collect traits in scope for foreign inherent impls by petrochenkov · Pu...
source link: https://github.com/rust-lang/rust/pull/93539
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Inherent impls can be inlined for variety of reasons (impls of reexported types, impls available through Deref
, impls inlined for unclear reasons like in #88679 (comment)).
If an impl is inlined, then doc links in its comments are resolved and we may need the set of traits that are in scope at that impl's definition point.
So in this PR we simply collect traits in scope for all inherent impls from other crates if their Self
type is public, which is very similar for the strategy for trait impls previously used in #88679.
Fixes #93476
Fixes #88679 (comment)
Fixes #88679 (comment)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK