Fix macro detection in empty_loop.

Co-Authored-By: daxpedda <1645124+daxpedda@users.noreply.github.com>
This commit is contained in:
Philipp Krones 2018-12-25 12:57:16 +01:00 committed by GitHub
parent a77bcadaa5
commit 197914439a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -479,7 +479,7 @@ impl LintPass for Pass {
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) {
// we don't want to check expanded macros
if !in_macro(expr.span) {
if in_macro(expr.span) {
return;
}