diff options
Diffstat (limited to 'components/plugins/lints/unrooted_must_root.rs')
-rw-r--r-- | components/plugins/lints/unrooted_must_root.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/components/plugins/lints/unrooted_must_root.rs b/components/plugins/lints/unrooted_must_root.rs index 25bae996f34..cc2ce5d8220 100644 --- a/components/plugins/lints/unrooted_must_root.rs +++ b/components/plugins/lints/unrooted_must_root.rs @@ -126,8 +126,7 @@ impl LateLintPass for UnrootedPass { match kind { visit::FnKind::ItemFn(n, _, _, _, _, _) | visit::FnKind::Method(n, _, _) if n.as_str() == "new" - || n.as_str() == "new_inherited" - || n.as_str() == "new_initialized" => { + || n.as_str().starts_with("new_") => { self.in_new_function = true; return; }, |