Skip to content

Commit 4d566b6

Browse files
committed
Auto merge of #4561 - rust-lang:let-return-fix, r=phansch
Fix let_and_return lint This fixes #4555 (false positive for the `let_and_return` lint). changelog: none
2 parents 0fcb49e + 2b75141 commit 4d566b6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clippy_lints/src/returns.rs

+2
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ impl Return {
208208
if let ast::ExprKind::Path(_, ref path) = retexpr.node;
209209
if match_path_ast(path, &[&*ident.name.as_str()]);
210210
if !in_external_macro(cx.sess(), initexpr.span);
211+
if !in_external_macro(cx.sess(), retexpr.span);
212+
if !in_external_macro(cx.sess(), local.span);
211213
then {
212214
span_lint_and_then(
213215
cx,

0 commit comments

Comments
 (0)