Skip to content

Commit 3583d61

Browse files
committed
Test fixes and rebase conflicts
1 parent 8824c39 commit 3583d61

File tree

8 files changed

+15
-22
lines changed

8 files changed

+15
-22
lines changed

src/libcollections/bit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ use core::fmt;
8888
use core::iter::{Cloned, Chain, Enumerate, Repeat, Skip, Take};
8989
use core::iter;
9090
use core::num::Int;
91-
use core::slice::{Items, MutItems};
91+
use core::slice::{Iter, IterMut};
9292
use core::{u8, u32, uint};
9393

9494
use core::hash;
9595
use Vec;
9696

97-
type Blocks<'a> = Cloned<Items<'a, u32>>;
98-
type MutBlocks<'a> = MutItems<'a, u32>;
97+
type Blocks<'a> = Cloned<Iter<'a, u32>>;
98+
type MutBlocks<'a> = IterMut<'a, u32>;
9999
type MatchWords<'a> = Chain<Enumerate<Blocks<'a>>, Skip<Take<Enumerate<Repeat<u32>>>>>;
100100

101101
fn reverse_bits(byte: u8) -> u8 {

src/libcore/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ impl<'a> DoubleEndedIterator<(uint, char)> for CharIndices<'a> {
336336
#[stable]
337337
#[deriving(Clone)]
338338
pub struct Bytes<'a> {
339-
inner: Map<&'a u8, u8, slice::Items<'a, u8>, BytesFn>,
339+
inner: Map<&'a u8, u8, slice::Iter<'a, u8>, BytesFn>,
340340
}
341341

342342
/// A temporary new type wrapper that ensures that the `Bytes` iterator

src/librustc/session/config.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,13 +743,12 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
743743
assumed.", "NAME[:KIND]"),
744744
opt::multi("", "crate-type", "Comma separated list of types of crates
745745
for the compiler to emit",
746-
"[bin|lib|rlib|dylib|staticlib]"),
746+
"[bin|lib|rlib|dylib|staticlib]"),
747747
opt::opt("", "crate-name", "Specify the name of the crate being built",
748748
"NAME"),
749749
opt::multi("", "emit", "Comma separated list of types of output for \
750750
the compiler to emit",
751751
"[asm|llvm-bc|llvm-ir|obj|link|dep-info]"),
752-
"[asm|llvm-bc|llvm-ir|obj|link]"),
753752
opt::multi("", "print", "Comma separated list of compiler information to \
754753
print on stdout",
755754
"[crate-name|output-file-names|sysroot]"),

src/librustc_trans/trans/closure.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -606,17 +606,6 @@ pub fn get_wrapper_for_bare_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
606606
fn_ptr: ValueRef,
607607
is_local: bool) -> ValueRef {
608608

609-
let def_id = match def {
610-
def::DefFn(did, _) | def::DefStaticMethod(did, _) |
611-
def::DefVariant(_, did, _) | def::DefStruct(did) => did,
612-
_ => {
613-
ccx.sess().bug(format!("get_wrapper_for_bare_fn: \
614-
expected a statically resolved fn, got \
615-
{}",
616-
def)[]);
617-
}
618-
};
619-
620609
match ccx.closure_bare_wrapper_cache().borrow().get(&fn_ptr) {
621610
Some(&llval) => return llval,
622611
None => {}

src/librustc_typeck/collect.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ pub fn get_enum_variant_types<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
219219
ast::TupleVariantKind(ref args) if args.len() > 0 => {
220220
let rs = ExplicitRscope;
221221
let input_tys: Vec<_> = args.iter().map(|va| ccx.to_ty(&rs, &*va.ty)).collect();
222-
ty::mk_ctor_fn(tcx, input_tys[], enum_ty)
222+
ty::mk_ctor_fn(tcx, variant_def_id, input_tys[], enum_ty)
223223
}
224224

225225
ast::TupleVariantKind(_) => {
@@ -1282,6 +1282,7 @@ pub fn convert_struct<'a, 'tcx>(ccx: &CrateCtxt<'a, 'tcx>,
12821282
|field| (*tcx.tcache.borrow())[
12831283
local_def(field.node.id)].ty).collect();
12841284
let ctor_fn_ty = ty::mk_ctor_fn(tcx,
1285+
local_def(ctor_id),
12851286
inputs[],
12861287
selfty);
12871288
write_ty_to_tcx(tcx, ctor_id, ctor_fn_ty);

src/libstd/path/windows.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,12 @@ impl Path {
827827
let s = if self.has_nonsemantic_trailing_slash() {
828828
self.repr[0..self.repr.len()-1]
829829
} else { self.repr[] };
830-
let idx = s.rfind(if !prefix_is_verbatim(self.prefix) { is_sep }
831-
else { is_sep_verbatim });
830+
let sep_test: fn(char) -> bool = if !prefix_is_verbatim(self.prefix) {
831+
is_sep
832+
} else {
833+
is_sep_verbatim
834+
};
835+
let idx = s.rfind(sep_test);
832836
let prefixlen = self.prefix_len();
833837
self.sepidx = idx.and_then(|x| if x < prefixlen { None } else { Some(x) });
834838
}

src/libstd/sys/unix/os.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ pub fn load_self() -> Option<Vec<u8>> {
189189
if sz == 0 { return None; }
190190
let mut v: Vec<u8> = Vec::with_capacity(sz as uint);
191191
let err = sysctl(mib.as_mut_ptr(), mib.len() as ::libc::c_uint,
192-
v.as_mut_ptr() as *mut c_void, &mut sz,
192+
v.as_mut_ptr() as *mut libc::c_void, &mut sz,
193193
ptr::null_mut(), 0u as libc::size_t);
194194
if err != 0 { return None; }
195195
if sz == 0 { return None; }

src/libunicode/u_str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ pub fn is_utf16(v: &[u16]) -> bool {
404404
/// of `u16`s.
405405
#[deriving(Clone)]
406406
pub struct Utf16Items<'a> {
407-
iter: slice::Items<'a, u16>
407+
iter: slice::Iter<'a, u16>
408408
}
409409
/// The possibilities for values decoded from a `u16` stream.
410410
#[deriving(PartialEq, Eq, Clone, Show)]

0 commit comments

Comments
 (0)