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.
#![feature(rustc_diagnostic_macros)]
#![feature(unboxed_closures)]
#![feature(old_orphan_check)]
+#![feature(associated_types)]
extern crate arena;
extern crate flate;
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() {
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;
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;
}
/// 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,
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;