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

View file

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

View file

@ -3070,7 +3070,9 @@ fn internalize_symbols(cx: &SharedCrateContext, reachable: &HashSet<String>) {
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> {
let old = self.cur;
if !old.is_null() {

View file

@ -168,7 +168,9 @@ pub struct CrateContextIterator<'a, 'tcx: 'a> {
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>> {
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;

View file

@ -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<I: Iterator<ValueRef>>(ccx: &CrateContext,
pub fn make_vtable<I: Iterator<Item=ValueRef>>(ccx: &CrateContext,
drop_glue: ValueRef,
size: ValueRef,
align: ValueRef,

View file

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