diff --git a/src/librustc/middle/trans/callee.rs b/src/librustc/middle/trans/callee.rs index 3405db8e52f..27f1c4d039d 100644 --- a/src/librustc/middle/trans/callee.rs +++ b/src/librustc/middle/trans/callee.rs @@ -233,7 +233,12 @@ pub fn trans_fn_ref_with_vtables( // Polytype of the function item (may have type params) let fn_tpt = ty::lookup_item_type(tcx, def_id); - let substs = ty::substs { self_r: None, self_ty: None, + // For simplicity, we want to use the Subst trait when composing + // substitutions for default methods. The subst trait does + // substitutions with regions, though, so we put a dummy self + // region parameter in to keep it from failing. This is a hack. + let substs = ty::substs { self_r: Some(ty::re_empty), + self_ty: None, tps: /*bad*/ type_params.to_owned() }; diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index aa4d632a482..8555d99255d 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -2346,6 +2346,7 @@ impl FromIter for ~[T]{ } } +#[cfg(stage0)] impl> FromIterator for ~[A] { pub fn from_iterator(iterator: &mut T) -> ~[A] { let mut xs = ~[]; @@ -2356,7 +2357,8 @@ impl> FromIterator for ~[A] { } } -/* FIXME: #7341 - ICE + +#[cfg(not(stage0))] impl> FromIterator for ~[A] { pub fn from_iterator(iterator: &mut T) -> ~[A] { let (lower, _) = iterator.size_hint(); @@ -2367,7 +2369,7 @@ impl> FromIterator for ~[A] { xs } } -*/ + #[cfg(test)] mod tests {