Skip to content

Commit

Permalink
Merge pull request #3252 from rust-lang-nursery/rustup
Browse files Browse the repository at this point in the history
Fix push_item_path call (rustup to 4cf1176)
  • Loading branch information
oli-obk authored Oct 3, 2018
2 parents 11cc847 + c430147 commit c47b948
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion clippy_lints/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ pub fn in_macro(span: Span) -> bool {
pub fn match_def_path(tcx: TyCtxt<'_, '_, '_>, def_id: DefId, path: &[&str]) -> bool {
use crate::syntax::symbol;

#[derive(Debug)]
struct AbsolutePathBuffer {
names: Vec<symbol::LocalInternedString>,
}
Expand All @@ -89,7 +90,7 @@ pub fn match_def_path(tcx: TyCtxt<'_, '_, '_>, def_id: DefId, path: &[&str]) ->

let mut apb = AbsolutePathBuffer { names: vec![] };

tcx.push_item_path(&mut apb, def_id);
tcx.push_item_path(&mut apb, def_id, false);

apb.names.len() == path.len()
&& apb.names
Expand Down

0 comments on commit c47b948

Please sign in to comment.