Skip to content

Commit dace2ee

Browse files
committed
rustdoc: Document is_assoc_ty()
It's adapted from the old documentation for the `is_generic` field.
1 parent 1085dc2 commit dace2ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustdoc/clean/types.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1498,6 +1498,7 @@ impl Type {
14981498
}
14991499
}
15001500

1501+
/// Checks if this is a `T::Name` path for an associated type.
15011502
crate fn is_assoc_ty(&self) -> bool {
15021503
match self {
15031504
ResolvedPath { path, .. } => path.is_assoc_ty(),
@@ -1990,6 +1991,7 @@ impl Path {
19901991
+ &self.segments.iter().map(|s| s.name.to_string()).collect::<Vec<_>>().join("::")
19911992
}
19921993

1994+
/// Checks if this is a `T::Name` path for an associated type.
19931995
crate fn is_assoc_ty(&self) -> bool {
19941996
match self.res {
19951997
Res::SelfTy(..) if self.segments.len() != 1 => true,

0 commit comments

Comments
 (0)