mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Simplify , removing a FIXME
This commit is contained in:
@@ -1126,7 +1126,6 @@ fn test_without_block_comments_lines_without_block_comments() {
|
||||
}
|
||||
|
||||
pub fn match_def_path<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, did: DefId, syms: &[&str]) -> bool {
|
||||
// HACK: find a way to use symbols from clippy or just go fully to diagnostic items
|
||||
let syms: Vec<_> = syms.iter().map(|sym| Symbol::intern(sym)).collect();
|
||||
cx.match_def_path(did, &syms)
|
||||
let path = cx.get_def_path(did);
|
||||
path.len() == syms.len() && path.into_iter().zip(syms.iter()).all(|(a, &b)| a.as_str() == b)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user