mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
Don't trigger debug_assert_with_mut_call
on .await
This commit is contained in:
parent
2c4df2418c
commit
f16e383709
@ -4,7 +4,7 @@ use matches::matches;
|
||||
use rustc::hir::map::Map;
|
||||
use rustc::ty;
|
||||
use rustc_hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
|
||||
use rustc_hir::{BorrowKind, Expr, ExprKind, Mutability, StmtKind, UnOp};
|
||||
use rustc_hir::{BorrowKind, Expr, ExprKind, MatchSource, Mutability, StmtKind, UnOp};
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_session::{declare_lint_pass, declare_tool_lint};
|
||||
use rustc_span::Span;
|
||||
@ -147,6 +147,8 @@ impl<'a, 'tcx> Visitor<'tcx> for MutArgVisitor<'a, 'tcx> {
|
||||
}
|
||||
}
|
||||
},
|
||||
// Don't check await desugars
|
||||
ExprKind::Match(_, _, MatchSource::AwaitDesugar) => return,
|
||||
_ if !self.found => self.expr_span = Some(expr.span),
|
||||
_ => return,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user