mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-31 13:40:15 +03:00
Rustup
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user