}
}
-fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter, full_path: bool) -> fmt::Result {
+fn fmt_type(t: &clean::Type, f: &mut fmt::Formatter, use_absolute: bool) -> fmt::Result {
match *t {
clean::Generic(ref name) => {
f.write_str(name)
}
clean::ResolvedPath{ did, ref typarams, ref path, is_generic } => {
// Paths like T::Output and Self::Output should be rendered with all segments
- resolved_path(f, did, path, is_generic, full_path)?;
+ resolved_path(f, did, path, is_generic, use_absolute)?;
tybounds(f, typarams)
}
clean::Infer => write!(f, "_"),
write!(f, "{}::", self_type)?;
}
let path = clean::Path::singleton(name.clone());
- resolved_path(f, did, &path, true, full_path)?;
+ resolved_path(f, did, &path, true, use_absolute)?;
// FIXME: `typarams` are not rendered, and this seems bad?
drop(typarams);
}
}
-fn fmt_impl(i: &clean::Impl, f: &mut fmt::Formatter, link_trait: bool, full: bool) -> fmt::Result {
+fn fmt_impl(i: &clean::Impl,
+ f: &mut fmt::Formatter,
+ link_trait: bool,
+ use_absolute: bool) -> fmt::Result {
let mut plain = String::new();
if f.alternate() {
plain.push_str(" for ");
}
- fmt_type(&i.for_, f, full)?;
+ fmt_type(&i.for_, f, use_absolute)?;
plain.push_str(&format!("{:#}", i.for_));
fmt::Display::fmt(&WhereClause(&i.generics, plain.len() + 1), f)?;
// The difference from above is that trait is not hyperlinked.
pub fn fmt_impl_for_trait_page(i: &clean::Impl,
f: &mut fmt::Formatter,
- disambiguate: bool) -> fmt::Result {
- fmt_impl(i, f, false, disambiguate)
+ use_absolute: bool) -> fmt::Result {
+ fmt_impl(i, f, false, use_absolute)
}
impl fmt::Display for clean::Arguments {
write!(w, "<li><code>")?;
// If there's already another implementor that has the same abbridged name, use the
// full path, for example in `std::iter::ExactSizeIterator`
- let dissambiguate = if let clean::Type::ResolvedPath {
+ let use_absolute = if let clean::Type::ResolvedPath {
ref path, ..
} = implementor.impl_.for_ {
implementor_count[path.last_name()] > 1
} else {
false
};
- fmt_impl_for_trait_page(&implementor.impl_, w, dissambiguate)?;
+ fmt_impl_for_trait_page(&implementor.impl_, w, use_absolute)?;
writeln!(w, "</code></li>")?;
}
}