mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-26 04:17:21 +00:00
Update clippy_lints/src/methods/mod.rs
Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
This commit is contained in:
parent
ffaadae8e4
commit
73b1ee1a61
1 changed files with 1 additions and 0 deletions
|
@ -1686,6 +1686,7 @@ impl<'tcx> LateLintPass<'tcx> for Methods {
|
|||
|
||||
fn check_trait_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx TraitItem<'_>) {
|
||||
if_chain! {
|
||||
if !in_external_macro(cx.tcx.sess, item.span);
|
||||
if item.ident.name == sym!(new);
|
||||
if let TraitItemKind::Fn(_, _) = item.kind;
|
||||
let ret_ty = return_ty(cx, item.hir_id);
|
||||
|
|
Loading…
Add table
Reference in a new issue