about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-12-22 12:56:18 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-12-22 15:17:26 -0800
commit3583d613b9c81855feb067aeeebb525cf8a4184c (patch)
tree931437f34b35af7d9f74b9fa5e335ddcfed35184
parent8824c39945cf8cbdd0e1a07824e3d2f4823b8e7b (diff)
downloadrust-3583d613b9c81855feb067aeeebb525cf8a4184c.tar.gz
rust-3583d613b9c81855feb067aeeebb525cf8a4184c.zip
Test fixes and rebase conflicts
-rw-r--r--src/libcollections/bit.rs6
-rw-r--r--src/libcore/str.rs2
-rw-r--r--src/librustc/session/config.rs3
-rw-r--r--src/librustc_trans/trans/closure.rs11
-rw-r--r--src/librustc_typeck/collect.rs3
-rw-r--r--src/libstd/path/windows.rs8
-rw-r--r--src/libstd/sys/unix/os.rs2
-rw-r--r--src/libunicode/u_str.rs2
8 files changed, 15 insertions, 22 deletions
diff --git a/src/libcollections/bit.rs b/src/libcollections/bit.rs
index 3b9b1eb1fb3..430d7210bf6 100644
--- a/src/libcollections/bit.rs
+++ b/src/libcollections/bit.rs
@@ -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 {
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index de5b34ff0ca..204ffae6cbd 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -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
diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs
index 86f0655a3ad..6629f6620d4 100644
--- a/src/librustc/session/config.rs
+++ b/src/librustc/session/config.rs
@@ -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]"),
diff --git a/src/librustc_trans/trans/closure.rs b/src/librustc_trans/trans/closure.rs
index 28716f0a481..0ae9de8c891 100644
--- a/src/librustc_trans/trans/closure.rs
+++ b/src/librustc_trans/trans/closure.rs
@@ -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 => {}
diff --git a/src/librustc_typeck/collect.rs b/src/librustc_typeck/collect.rs
index c7c33db5746..8380ed349cb 100644
--- a/src/librustc_typeck/collect.rs
+++ b/src/librustc_typeck/collect.rs
@@ -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);
diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs
index b24966241ff..7d10188c437 100644
--- a/src/libstd/path/windows.rs
+++ b/src/libstd/path/windows.rs
@@ -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) });
     }
diff --git a/src/libstd/sys/unix/os.rs b/src/libstd/sys/unix/os.rs
index 6c909d7562d..316d97064ee 100644
--- a/src/libstd/sys/unix/os.rs
+++ b/src/libstd/sys/unix/os.rs
@@ -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; }
diff --git a/src/libunicode/u_str.rs b/src/libunicode/u_str.rs
index 65b8ad997f6..a3d4dd057d0 100644
--- a/src/libunicode/u_str.rs
+++ b/src/libunicode/u_str.rs
@@ -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)]