]> git.lizzy.rs Git - rust.git/commitdiff
Document `check_ty` and its new `is_local` arg.
authorscott-linder <scott.b.linder@wmich.edu>
Mon, 12 Jun 2017 12:43:02 +0000 (08:43 -0400)
committerscott-linder <scott.b.linder@wmich.edu>
Mon, 12 Jun 2017 12:43:02 +0000 (08:43 -0400)
clippy_lints/src/types.rs

index b3d2a374865e38ea7a17ec48ee47f29d19b466cc..0204bfff0d4362928339244b2193ab86cc05d992 100644 (file)
@@ -129,6 +129,11 @@ fn check_fn_decl(cx: &LateContext, decl: &FnDecl) {
     }
 }
 
+/// Recursively check for `TypePass` lints in the given type. Stop at the first
+/// lint found.
+///
+/// The parameter `is_local` distinguishes the context of the type; types from
+/// local bindings should only be checked for the `BORROWED_BOX` lint.
 fn check_ty(cx: &LateContext, ast_ty: &hir::Ty, is_local: bool) {
     if in_macro(ast_ty.span) {
         return;