rustdoc: Improve impl disambiguation
* Don't disambiguate if there are multiple impls for the same type. * Disambiguate for impls of &Foo and &mut Foo. * Don't try to disambiguate generic types.
This commit is contained in:
@@ -671,9 +671,11 @@ fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter, use_absolute: bool) -> fmt:
|
||||
}
|
||||
_ => {
|
||||
if f.alternate() {
|
||||
write!(f, "&{}{}{:#}", lt, m, **ty)
|
||||
write!(f, "&{}{}", lt, m)?;
|
||||
fmt_type(&ty, f, use_absolute)
|
||||
} else {
|
||||
write!(f, "&{}{}{}", lt, m, **ty)
|
||||
write!(f, "&{}{}", lt, m)?;
|
||||
fmt_type(&ty, f, use_absolute)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user