Skip to content

Commit 72058a6

Browse files
committed
Simplify , removing a FIXME
1 parent c3d4294 commit 72058a6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clippy_lints/src/utils/mod.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1126,7 +1126,6 @@ mod test {
11261126
}
11271127

11281128
pub fn match_def_path<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, did: DefId, syms: &[&str]) -> bool {
1129-
// HACK: find a way to use symbols from clippy or just go fully to diagnostic items
1130-
let syms: Vec<_> = syms.iter().map(|sym| Symbol::intern(sym)).collect();
1131-
cx.match_def_path(did, &syms)
1129+
let path = cx.get_def_path(did);
1130+
path.len() == syms.len() && path.into_iter().zip(syms.iter()).all(|(a, &b)| a.as_str() == b)
11321131
}

0 commit comments

Comments
 (0)