Fix push_item_path call (rustup to 4cf11765dc98536c6eedf33f2df7f72f6e161263)

This commit is contained in:
Manish Goregaokar 2018-10-03 02:02:50 -07:00
parent 11cc8472a9
commit c430147942
1 changed files with 2 additions and 1 deletions

View File

@ -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>,
}
@ -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