Rustup
This commit is contained in:
parent
76573bac16
commit
b0d3daed40
4 changed files with 5 additions and 4 deletions
|
|
@ -111,7 +111,7 @@ fn after_analysis<'a, 'tcx>(state: &mut CompileState<'a, 'tcx>) {
|
|||
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::hir::def_id::{DefId, CRATE_DEF_INDEX};
|
|||
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;
|
|||
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]
|
||||
|
|
|
|||
|
|
@ -455,7 +455,10 @@ impl<'a, 'mir, 'tcx: 'mir + 'a> EvalContextExt<'tcx> for EvalContext<'a, 'mir, '
|
|||
}
|
||||
|
||||
// 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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue