Some tracing and comment cleanups
This commit is contained in:
parent
47c008e440
commit
44d1936d00
10 changed files with 23 additions and 56 deletions
|
@ -388,6 +388,8 @@ impl<'hir> GenericArgs<'hir> {
|
|||
}
|
||||
|
||||
#[inline]
|
||||
/// This function returns the number of type and const generic params.
|
||||
/// It should only be used for diagnostics.
|
||||
pub fn num_generic_params(&self) -> usize {
|
||||
self.args.iter().filter(|arg| !matches!(arg, GenericArg::Lifetime(_))).count()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue