Update clippy_lints/src/methods/mod.rs

Co-authored-by: Eduardo Broto <ebroto@tutanota.com>
This commit is contained in:
Thibaud 2020-08-28 09:33:05 +02:00 committed by GitHub
parent ffaadae8e4
commit 73b1ee1a61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);