Rustup to rustc 1.16.0-nightly (468227129 2017-01-03): Body fixes for rustup

This commit is contained in:
Josh Holmer
2017-01-03 23:40:42 -05:00
committed by Manish Goregaokar
parent f552f170db
commit 64f5dbc9f8
26 changed files with 117 additions and 103 deletions

View File

@@ -94,20 +94,20 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CyclomaticComplexity {
fn check_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx Item) {
if let ItemFn(_, _, _, _, _, eid) = item.node {
if !attr::contains_name(&item.attrs, "test") {
self.check(cx, cx.tcx.map.expr(eid), item.span);
self.check(cx, &cx.tcx.map.body(eid).value, item.span);
}
}
}
fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem) {
if let ImplItemKind::Method(_, eid) = item.node {
self.check(cx, cx.tcx.map.expr(eid), item.span);
self.check(cx, &cx.tcx.map.body(eid).value, item.span);
}
}
fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx TraitItem) {
if let TraitItemKind::Method(_, Some(eid)) = item.node {
self.check(cx, cx.tcx.map.expr(eid), item.span);
if let TraitItemKind::Method(_, TraitMethod::Provided(eid)) = item.node {
self.check(cx, &cx.tcx.map.body(eid).value, item.span);
}
}