-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Open
Labels
A-technical-debtArea: Internal cleanup workArea: Internal cleanup workT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
rust/src/librustdoc/passes/collect_trait_impls.rs
Lines 84 to 89 in 4c5f6e6
if did.is_local() { | |
for def_id in prim.impls(cx.tcx) { | |
let impls = get_auto_trait_and_blanket_impls(cx, def_id); | |
new_items_external.extend(impls.filter(|i| cx.inlined.insert(i.item_id))); | |
} | |
} |
This tactic of using inherent impl blocks for getting
auto traits and blanket impls is a hack. What we really
want is to check if [T]
impls Send
, which has
nothing to do with the inherent impl.
Rustdoc currently uses these impl
block as a source of
the Ty
, as well as the ParamEnv
, SubstsRef
, and
Generics
. To avoid relying on the impl
block, these
things would need to be created from wholecloth, in a
form that is valid for use in type inference.
Metadata
Metadata
Assignees
Labels
A-technical-debtArea: Internal cleanup workArea: Internal cleanup workT-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.