Rename in_macro to in_macro_or_desugar

This commit is contained in:
Manish Goregaokar
2019-05-11 20:40:05 -07:00
parent 3710ec5996
commit 7eb8018554
45 changed files with 132 additions and 121 deletions

View File

@@ -14,7 +14,7 @@ use rustc_errors::Applicability;
use rustc_typeck::hir_ty_to_ty;
use syntax_pos::{Span, DUMMY_SP};
use crate::utils::{in_constant, in_macro, is_copy, span_lint_and_then};
use crate::utils::{in_constant, in_macro_or_desugar, is_copy, span_lint_and_then};
declare_clippy_lint! {
/// **What it does:** Checks for declaration of `const` items which is interior
@@ -118,7 +118,7 @@ fn verify_ty_bound<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>, source: S
let (lint, msg, span) = source.lint();
span_lint_and_then(cx, lint, span, msg, |db| {
if in_macro(span) {
if in_macro_or_desugar(span) {
return; // Don't give suggestions into macros.
}
match source {