rustc_trans: fix fallout

This commit is contained in:
Jorge Aparicio 2015-01-01 23:54:03 -05:00
parent 274146d650
commit 964ff83cbc
6 changed files with 15 additions and 6 deletions

View File

@ -266,7 +266,7 @@ pub fn sanitize(s: &str) -> String {
return result; return result;
} }
pub fn mangle<PI: Iterator<PathElem>>(mut path: PI, pub fn mangle<PI: Iterator<Item=PathElem>>(mut path: PI,
hash: Option<&str>) -> String { hash: Option<&str>) -> String {
// Follow C++ namespace-mangling style, see // Follow C++ namespace-mangling style, see
// http://en.wikipedia.org/wiki/Name_mangling for more info. // http://en.wikipedia.org/wiki/Name_mangling for more info.

View File

@ -28,6 +28,7 @@
#![feature(rustc_diagnostic_macros)] #![feature(rustc_diagnostic_macros)]
#![feature(unboxed_closures)] #![feature(unboxed_closures)]
#![feature(old_orphan_check)] #![feature(old_orphan_check)]
#![feature(associated_types)]
extern crate arena; extern crate arena;
extern crate flate; extern crate flate;

View File

@ -3070,7 +3070,9 @@ fn internalize_symbols(cx: &SharedCrateContext, reachable: &HashSet<String>) {
step: unsafe extern "C" fn(ValueRef) -> ValueRef, step: unsafe extern "C" fn(ValueRef) -> ValueRef,
} }
impl Iterator<ValueRef> for ValueIter { impl Iterator for ValueIter {
type Item = ValueRef;
fn next(&mut self) -> Option<ValueRef> { fn next(&mut self) -> Option<ValueRef> {
let old = self.cur; let old = self.cur;
if !old.is_null() { if !old.is_null() {

View File

@ -168,7 +168,9 @@ pub struct CrateContextIterator<'a, 'tcx: 'a> {
index: uint, index: uint,
} }
impl<'a, 'tcx> Iterator<CrateContext<'a, 'tcx>> for CrateContextIterator<'a,'tcx> { impl<'a, 'tcx> Iterator for CrateContextIterator<'a,'tcx> {
type Item = CrateContext<'a, 'tcx>;
fn next(&mut self) -> Option<CrateContext<'a, 'tcx>> { fn next(&mut self) -> Option<CrateContext<'a, 'tcx>> {
if self.index >= self.shared.local_ccxs.len() { if self.index >= self.shared.local_ccxs.len() {
return None; return None;
@ -193,7 +195,9 @@ pub struct CrateContextMaybeIterator<'a, 'tcx: 'a> {
origin: uint, 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)> { fn next(&mut self) -> Option<(CrateContext<'a, 'tcx>, bool)> {
if self.index >= self.shared.local_ccxs.len() { if self.index >= self.shared.local_ccxs.len() {
return None; return None;

View File

@ -727,7 +727,7 @@ pub fn get_vtable<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
} }
/// Helper function to declare and initialize the vtable. /// Helper function to declare and initialize the vtable.
pub fn make_vtable<I: Iterator<ValueRef>>(ccx: &CrateContext, pub fn make_vtable<I: Iterator<Item=ValueRef>>(ccx: &CrateContext,
drop_glue: ValueRef, drop_glue: ValueRef,
size: ValueRef, size: ValueRef,
align: ValueRef, align: ValueRef,

View File

@ -155,7 +155,9 @@ pub struct Users {
next: Option<Use> next: Option<Use>
} }
impl Iterator<Value> for Users { impl Iterator for Users {
type Item = Value;
fn next(&mut self) -> Option<Value> { fn next(&mut self) -> Option<Value> {
let current = self.next; let current = self.next;