Skip to content

Commit

Permalink
Auto merge of #4561 - rust-lang:let-return-fix, r=phansch
Browse files Browse the repository at this point in the history
Fix let_and_return lint

This fixes #4555 (false positive for the `let_and_return` lint).

changelog: none
  • Loading branch information
bors committed Sep 23, 2019
2 parents 0fcb49e + 2b75141 commit 4d566b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clippy_lints/src/returns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ impl Return {
if let ast::ExprKind::Path(_, ref path) = retexpr.node;
if match_path_ast(path, &[&*ident.name.as_str()]);
if !in_external_macro(cx.sess(), initexpr.span);
if !in_external_macro(cx.sess(), retexpr.span);
if !in_external_macro(cx.sess(), local.span);
then {
span_lint_and_then(
cx,
Expand Down

0 comments on commit 4d566b6

Please sign in to comment.