mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
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
This commit is contained in:
commit
4d566b6959
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue