This commit is contained in:
Oliver Schneider
2018-05-07 10:18:45 +02:00
parent 76573bac16
commit b0d3daed40
4 changed files with 5 additions and 4 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ impl<'a, 'tcx: 'a, 'hir> itemlikevisit::ItemLikeVisitor<'hir> for Visitor<'a, 't
fn visit_item(&mut self, i: &'hir hir::Item) {
if let hir::Item_::ItemFn(_, _, _, _, _, body_id) = i.node {
if i.attrs.iter().any(|attr| {
attr.name().map_or(false, |n| n == "test")
attr.name() == "test"
})
{
let did = self.0.hir.body_owner_def_id(body_id);
-1
View File
@@ -4,7 +4,6 @@
use rustc::mir;
use rustc_target::spec::abi::Abi;
use rustc_data_structures::indexed_vec::Idx;
use rustc_target::spec::abi::Abi;
use syntax::attr;
use syntax::codemap::Span;
-1
View File
@@ -14,7 +14,6 @@
extern crate rustc_mir;
extern crate rustc_target;
extern crate rustc_data_structures;
extern crate rustc_target;
extern crate syntax;
extern crate regex;
#[macro_use]
+4 -1
View File
@@ -455,7 +455,10 @@ fn field_with_lifetimes(
}
// Discriminant field for enums (where applicable).
Variants::Tagged { ref discr, .. } |
Variants::Tagged { ref tag, .. } => {
assert_eq!(i, 0);
return Ok(tag.value.to_ty(tcx))
},
Variants::NicheFilling { niche: ref discr, .. } => {
assert_eq!(i, 0);
return Ok(discr.value.to_ty(tcx))