diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index 93ff9f53ec1..c3c97616ea8 100644 --- a/src/librustc_trans/back/link.rs +++ b/src/librustc_trans/back/link.rs @@ -266,7 +266,7 @@ pub fn sanitize(s: &str) -> String { return result; } -pub fn mangle>(mut path: PI, +pub fn mangle>(mut path: PI, hash: Option<&str>) -> String { // Follow C++ namespace-mangling style, see // http://en.wikipedia.org/wiki/Name_mangling for more info. diff --git a/src/librustc_trans/lib.rs b/src/librustc_trans/lib.rs index 5ffe9b2d647..9dbff66aba2 100644 --- a/src/librustc_trans/lib.rs +++ b/src/librustc_trans/lib.rs @@ -28,6 +28,7 @@ #![feature(rustc_diagnostic_macros)] #![feature(unboxed_closures)] #![feature(old_orphan_check)] +#![feature(associated_types)] extern crate arena; extern crate flate; diff --git a/src/librustc_trans/trans/base.rs b/src/librustc_trans/trans/base.rs index bf53885e9e5..d1cb22dce38 100644 --- a/src/librustc_trans/trans/base.rs +++ b/src/librustc_trans/trans/base.rs @@ -3070,7 +3070,9 @@ fn internalize_symbols(cx: &SharedCrateContext, reachable: &HashSet) { step: unsafe extern "C" fn(ValueRef) -> ValueRef, } - impl Iterator for ValueIter { + impl Iterator for ValueIter { + type Item = ValueRef; + fn next(&mut self) -> Option { let old = self.cur; if !old.is_null() { diff --git a/src/librustc_trans/trans/context.rs b/src/librustc_trans/trans/context.rs index 9ceb0c63990..67aecde6618 100644 --- a/src/librustc_trans/trans/context.rs +++ b/src/librustc_trans/trans/context.rs @@ -168,7 +168,9 @@ pub struct CrateContextIterator<'a, 'tcx: 'a> { index: uint, } -impl<'a, 'tcx> Iterator> for CrateContextIterator<'a,'tcx> { +impl<'a, 'tcx> Iterator for CrateContextIterator<'a,'tcx> { + type Item = CrateContext<'a, 'tcx>; + fn next(&mut self) -> Option> { if self.index >= self.shared.local_ccxs.len() { return None; @@ -193,7 +195,9 @@ pub struct CrateContextMaybeIterator<'a, 'tcx: 'a> { origin: uint, } -impl<'a, 'tcx> Iterator<(CrateContext<'a, 'tcx>, bool)> for CrateContextMaybeIterator<'a, 'tcx> { +impl<'a, 'tcx> Iterator for CrateContextMaybeIterator<'a, 'tcx> { + type Item = (CrateContext<'a, 'tcx>, bool); + fn next(&mut self) -> Option<(CrateContext<'a, 'tcx>, bool)> { if self.index >= self.shared.local_ccxs.len() { return None; diff --git a/src/librustc_trans/trans/meth.rs b/src/librustc_trans/trans/meth.rs index 99624f1b1e7..f0588b3082a 100644 --- a/src/librustc_trans/trans/meth.rs +++ b/src/librustc_trans/trans/meth.rs @@ -727,7 +727,7 @@ pub fn get_vtable<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, } /// Helper function to declare and initialize the vtable. -pub fn make_vtable>(ccx: &CrateContext, +pub fn make_vtable>(ccx: &CrateContext, drop_glue: ValueRef, size: ValueRef, align: ValueRef, diff --git a/src/librustc_trans/trans/value.rs b/src/librustc_trans/trans/value.rs index 9e959ce4221..028e2154303 100644 --- a/src/librustc_trans/trans/value.rs +++ b/src/librustc_trans/trans/value.rs @@ -155,7 +155,9 @@ pub struct Users { next: Option } -impl Iterator for Users { +impl Iterator for Users { + type Item = Value; + fn next(&mut self) -> Option { let current = self.next;