rustdoc: Stop treating Self
as a generic in search index
We already have special-cased code to handle inlining `Self` as the type or trait it refers to, and this was just causing glitches like the search `A -> B` yielding blanket `Into` impls.
This commit is contained in:
parent
664b3ffbe9
commit
4e348fa803
@ -852,14 +852,9 @@ fn simplify_fn_type<'tcx, 'a>(
|
||||
(false, arg)
|
||||
};
|
||||
|
||||
let as_arg_s = |t: &Type| match *t {
|
||||
Type::Generic(arg_s) => Some(arg_s),
|
||||
Type::SelfTy => Some(kw::SelfUpper),
|
||||
_ => None,
|
||||
};
|
||||
// If this argument is a type parameter and not a trait bound or a type, we need to look
|
||||
// for its bounds.
|
||||
if let Some(arg_s) = as_arg_s(arg) {
|
||||
if let Type::Generic(arg_s) = *arg {
|
||||
// First we check if the bounds are in a `where` predicate...
|
||||
let mut type_bounds = Vec::new();
|
||||
for where_pred in generics.where_predicates.iter().filter(|g| match g {
|
||||
|
Loading…
Reference in New Issue
Block a user