Skip to content

Commit f770d15

Browse files
committed
use CompilerDesugaringKind
1 parent d1eecba commit f770d15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/utils/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use std::mem;
1616
use std::str::FromStr;
1717
use syntax::ast::{self, LitKind};
1818
use syntax::attr;
19-
use syntax::codemap::{ExpnFormat, ExpnInfo, Span, DUMMY_SP};
19+
use syntax::codemap::{CompilerDesugaringKind, ExpnFormat, ExpnInfo, Span, DUMMY_SP};
2020
use syntax::errors::DiagnosticBuilder;
2121
use syntax::ptr::P;
2222
use syntax::symbol::keywords;
@@ -114,7 +114,7 @@ pub fn in_constant(cx: &LateContext, id: NodeId) -> bool {
114114
pub fn in_macro(span: Span) -> bool {
115115
span.ctxt.outer().expn_info().map_or(false, |info| {
116116
match info.callee.format {// don't treat range expressions desugared to structs as "in_macro"
117-
ExpnFormat::CompilerDesugaring(name) => name != "...",
117+
ExpnFormat::CompilerDesugaring(kind) => kind != CompilerDesugaringKind::DotFill,
118118
_ => true,
119119
}
120120
})

0 commit comments

Comments
 (0)