Test fixes and rebase conflicts
This commit is contained in:
parent
8824c39945
commit
3583d613b9
|
@ -88,14 +88,14 @@ use core::fmt;
|
|||
use core::iter::{Cloned, Chain, Enumerate, Repeat, Skip, Take};
|
||||
use core::iter;
|
||||
use core::num::Int;
|
||||
use core::slice::{Items, MutItems};
|
||||
use core::slice::{Iter, IterMut};
|
||||
use core::{u8, u32, uint};
|
||||
|
||||
use core::hash;
|
||||
use Vec;
|
||||
|
||||
type Blocks<'a> = Cloned<Items<'a, u32>>;
|
||||
type MutBlocks<'a> = MutItems<'a, u32>;
|
||||
type Blocks<'a> = Cloned<Iter<'a, u32>>;
|
||||
type MutBlocks<'a> = IterMut<'a, u32>;
|
||||
type MatchWords<'a> = Chain<Enumerate<Blocks<'a>>, Skip<Take<Enumerate<Repeat<u32>>>>>;
|
||||
|
||||
fn reverse_bits(byte: u8) -> u8 {
|
||||
|
|
|
@ -336,7 +336,7 @@ impl<'a> DoubleEndedIterator<(uint, char)> for CharIndices<'a> {
|
|||
#[stable]
|
||||
#[deriving(Clone)]
|
||||
pub struct Bytes<'a> {
|
||||
inner: Map<&'a u8, u8, slice::Items<'a, u8>, BytesFn>,
|
||||
inner: Map<&'a u8, u8, slice::Iter<'a, u8>, BytesFn>,
|
||||
}
|
||||
|
||||
/// A temporary new type wrapper that ensures that the `Bytes` iterator
|
||||
|
|
|
@ -743,13 +743,12 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
|
|||
assumed.", "NAME[:KIND]"),
|
||||
opt::multi("", "crate-type", "Comma separated list of types of crates
|
||||
for the compiler to emit",
|
||||
"[bin|lib|rlib|dylib|staticlib]"),
|
||||
"[bin|lib|rlib|dylib|staticlib]"),
|
||||
opt::opt("", "crate-name", "Specify the name of the crate being built",
|
||||
"NAME"),
|
||||
opt::multi("", "emit", "Comma separated list of types of output for \
|
||||
the compiler to emit",
|
||||
"[asm|llvm-bc|llvm-ir|obj|link|dep-info]"),
|
||||
"[asm|llvm-bc|llvm-ir|obj|link]"),
|
||||
opt::multi("", "print", "Comma separated list of compiler information to \
|
||||
print on stdout",
|
||||
"[crate-name|output-file-names|sysroot]"),
|
||||
|
|
|
@ -606,17 +606,6 @@ pub fn get_wrapper_for_bare_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
|
|||
fn_ptr: ValueRef,
|
||||
is_local: bool) -> ValueRef {
|
||||
|
||||
let def_id = match def {
|
||||
def::DefFn(did, _) | def::DefStaticMethod(did, _) |
|
||||
def::DefVariant(_, did, _) | def::DefStruct(did) => did,
|
||||
_ => {
|
||||
ccx.sess().bug(format!("get_wrapper_for_bare_fn: \
|
||||
expected a statically resolved fn, got \
|
||||
{}",
|
||||
def)[]);
|
||||
}
|
||||
};
|
||||
|
||||
match ccx.closure_bare_wrapper_cache().borrow().get(&fn_ptr) {
|
||||
Some(&llval) => return llval,
|
||||
None => {}
|
||||
|
|
|
@ -219,7 +219,7 @@ pub fn get_enum_variant_types<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
|
|||
ast::TupleVariantKind(ref args) if args.len() > 0 => {
|
||||
let rs = ExplicitRscope;
|
||||
let input_tys: Vec<_> = args.iter().map(|va| ccx.to_ty(&rs, &*va.ty)).collect();
|
||||
ty::mk_ctor_fn(tcx, input_tys[], enum_ty)
|
||||
ty::mk_ctor_fn(tcx, variant_def_id, input_tys[], enum_ty)
|
||||
}
|
||||
|
||||
ast::TupleVariantKind(_) => {
|
||||
|
@ -1282,6 +1282,7 @@ pub fn convert_struct<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
|
|||
|field| (*tcx.tcache.borrow())[
|
||||
local_def(field.node.id)].ty).collect();
|
||||
let ctor_fn_ty = ty::mk_ctor_fn(tcx,
|
||||
local_def(ctor_id),
|
||||
inputs[],
|
||||
selfty);
|
||||
write_ty_to_tcx(tcx, ctor_id, ctor_fn_ty);
|
||||
|
|
|
@ -827,8 +827,12 @@ impl Path {
|
|||
let s = if self.has_nonsemantic_trailing_slash() {
|
||||
self.repr[0..self.repr.len()-1]
|
||||
} else { self.repr[] };
|
||||
let idx = s.rfind(if !prefix_is_verbatim(self.prefix) { is_sep }
|
||||
else { is_sep_verbatim });
|
||||
let sep_test: fn(char) -> bool = if !prefix_is_verbatim(self.prefix) {
|
||||
is_sep
|
||||
} else {
|
||||
is_sep_verbatim
|
||||
};
|
||||
let idx = s.rfind(sep_test);
|
||||
let prefixlen = self.prefix_len();
|
||||
self.sepidx = idx.and_then(|x| if x < prefixlen { None } else { Some(x) });
|
||||
}
|
||||
|
|
|
@ -189,7 +189,7 @@ pub fn load_self() -> Option<Vec<u8>> {
|
|||
if sz == 0 { return None; }
|
||||
let mut v: Vec<u8> = Vec::with_capacity(sz as uint);
|
||||
let err = sysctl(mib.as_mut_ptr(), mib.len() as ::libc::c_uint,
|
||||
v.as_mut_ptr() as *mut c_void, &mut sz,
|
||||
v.as_mut_ptr() as *mut libc::c_void, &mut sz,
|
||||
ptr::null_mut(), 0u as libc::size_t);
|
||||
if err != 0 { return None; }
|
||||
if sz == 0 { return None; }
|
||||
|
|
|
@ -404,7 +404,7 @@ pub fn is_utf16(v: &[u16]) -> bool {
|
|||
/// of `u16`s.
|
||||
#[deriving(Clone)]
|
||||
pub struct Utf16Items<'a> {
|
||||
iter: slice::Items<'a, u16>
|
||||
iter: slice::Iter<'a, u16>
|
||||
}
|
||||
/// The possibilities for values decoded from a `u16` stream.
|
||||
#[deriving(PartialEq, Eq, Clone, Show)]
|
||||
|
|
Loading…
Reference in New Issue