rustdoc: Document is_assoc_ty()
It's adapted from the old documentation for the `is_generic` field.
This commit is contained in:
parent
1085dc2148
commit
dace2ee674
1 changed files with 2 additions and 0 deletions
|
|
@ -1498,6 +1498,7 @@ impl Type {
|
|||
}
|
||||
}
|
||||
|
||||
/// Checks if this is a `T::Name` path for an associated type.
|
||||
crate fn is_assoc_ty(&self) -> bool {
|
||||
match self {
|
||||
ResolvedPath { path, .. } => path.is_assoc_ty(),
|
||||
|
|
@ -1990,6 +1991,7 @@ impl Path {
|
|||
+ &self.segments.iter().map(|s| s.name.to_string()).collect::<Vec<_>>().join("::")
|
||||
}
|
||||
|
||||
/// Checks if this is a `T::Name` path for an associated type.
|
||||
crate fn is_assoc_ty(&self) -> bool {
|
||||
match self.res {
|
||||
Res::SelfTy(..) if self.segments.len() != 1 => true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue