Rustup to *rustc 1.14.0-nightly (3210fd5c2 2016-10-05)*

This commit is contained in:
mcarton
2016-10-06 17:46:50 +02:00
parent e851bc7404
commit 0475eae1fa
3 changed files with 10 additions and 6 deletions

View File

@@ -234,10 +234,10 @@ pub fn path_to_def(cx: &LateContext, path: &[&str]) -> Option<def::Def> {
for item in &mem::replace(&mut items, vec![]) {
if item.name.as_str() == *segment {
if path_it.peek().is_none() {
return cx.tcx.sess.cstore.describe_def(item.def_id);
return Some(item.def);
}
items = cstore.item_children(item.def_id);
items = cstore.item_children(item.def.def_id());
break;
}
}
@@ -723,7 +723,7 @@ pub fn is_copy<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: ty::Ty<'tcx>, env: Node
/// Return whether a pattern is refutable.
pub fn is_refutable(cx: &LateContext, pat: &Pat) -> bool {
fn is_enum_variant(cx: &LateContext, did: NodeId) -> bool {
matches!(cx.tcx.def_map.borrow().get(&did).map(|d| d.full_def()), Some(def::Def::Variant(..)))
matches!(cx.tcx.def_map.borrow().get(&did).map(|d| d.full_def()), Some(def::Def::Variant(..)) | Some(def::Def::VariantCtor(..)))
}
fn are_refutable<'a, I: Iterator<Item=&'a Pat>>(cx: &LateContext, mut i: I) -> bool {