]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir/src/hir.rs
Rollup merge of #104035 - m-ou-se:weird-expr-closure-match, r=compiler-errors
[rust.git] / compiler / rustc_hir / src / hir.rs
index ef00c1ffc302d9ab12e510db364b7357c2b0fe5c..82e260d158bc468acb5ec56372e53e49e1a4fb82 100644 (file)
@@ -388,6 +388,8 @@ pub fn has_lifetime_params(&self) -> bool {
     }
 
     #[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()
     }