Fix build for rustc 1.3.0-nightly (bf3c979ec 2015-06-30)

This commit is contained in:
Zachary Bush
2015-07-01 09:21:46 -07:00
parent 0ffbdf2f8a
commit 038d540ab1
4 changed files with 12 additions and 13 deletions

View File

@@ -30,7 +30,7 @@ pub fn in_external_macro(cx: &Context, span: Span) -> bool {
/// usage e.g. with
/// `match_def_path(cx, id, &["core", "option", "Option"])`
pub fn match_def_path(cx: &Context, def_id: DefId, path: &[&str]) -> bool {
ty::with_path(cx.tcx, def_id, |iter| iter.map(|elem| elem.name())
cx.tcx.with_path(def_id, |iter| iter.map(|elem| elem.name())
.zip(path.iter()).all(|(nm, p)| &nm.as_str() == p))
}