about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/librustc/middle/ty_relate/mod.rs36
-rw-r--r--src/test/auxiliary/coherence_copy_like_lib.rs4
-rw-r--r--src/test/compile-fail/coherence_copy_like_err_fundamental_struct.rs4
-rw-r--r--src/test/compile-fail/coherence_copy_like_err_fundamental_struct_ref.rs4
-rw-r--r--src/test/run-pass/coherence_copy_like.rs4
-rw-r--r--src/test/run-pass/traits-conditional-dispatch.rs4
6 files changed, 23 insertions, 33 deletions
diff --git a/src/librustc/middle/ty_relate/mod.rs b/src/librustc/middle/ty_relate/mod.rs
index 1205b7d9579..3a55a64314e 100644
--- a/src/librustc/middle/ty_relate/mod.rs
+++ b/src/librustc/middle/ty_relate/mod.rs
@@ -122,11 +122,11 @@ fn relate_item_substs<'a,'tcx:'a,R>(relation: &mut R,
     relate_substs(relation, opt_variances, a_subst, b_subst)
 }
 
-fn relate_substs<'a,'tcx,R>(relation: &mut R,
-                            variances: Option<&ty::ItemVariances>,
-                            a_subst: &Substs<'tcx>,
-                            b_subst: &Substs<'tcx>)
-                            -> RelateResult<'tcx, Substs<'tcx>>
+fn relate_substs<'a,'tcx:'a,R>(relation: &mut R,
+                               variances: Option<&ty::ItemVariances>,
+                               a_subst: &Substs<'tcx>,
+                               b_subst: &Substs<'tcx>)
+                               -> RelateResult<'tcx, Substs<'tcx>>
     where R: TypeRelation<'a,'tcx>
 {
     let mut substs = Substs::empty();
@@ -161,11 +161,11 @@ fn relate_substs<'a,'tcx,R>(relation: &mut R,
     Ok(substs)
 }
 
-fn relate_type_params<'a,'tcx,R>(relation: &mut R,
-                                 variances: Option<&[ty::Variance]>,
-                                 a_tys: &[Ty<'tcx>],
-                                 b_tys: &[Ty<'tcx>])
-                                 -> RelateResult<'tcx, Vec<Ty<'tcx>>>
+fn relate_type_params<'a,'tcx:'a,R>(relation: &mut R,
+                                    variances: Option<&[ty::Variance]>,
+                                    a_tys: &[Ty<'tcx>],
+                                    b_tys: &[Ty<'tcx>])
+                                    -> RelateResult<'tcx, Vec<Ty<'tcx>>>
     where R: TypeRelation<'a,'tcx>
 {
     if a_tys.len() != b_tys.len() {
@@ -264,10 +264,10 @@ impl<'a,'tcx:'a> Relate<'a,'tcx> for ty::FnSig<'tcx> {
     }
 }
 
-fn relate_arg_vecs<'a,'tcx,R>(relation: &mut R,
-                              a_args: &[Ty<'tcx>],
-                              b_args: &[Ty<'tcx>])
-                              -> RelateResult<'tcx, Vec<Ty<'tcx>>>
+fn relate_arg_vecs<'a,'tcx:'a,R>(relation: &mut R,
+                                 a_args: &[Ty<'tcx>],
+                                 b_args: &[Ty<'tcx>])
+                                 -> RelateResult<'tcx, Vec<Ty<'tcx>>>
     where R: TypeRelation<'a,'tcx>
 {
     if a_args.len() != b_args.len() {
@@ -629,10 +629,10 @@ impl<'a,'tcx:'a,T> Relate<'a,'tcx> for Box<T>
 ///////////////////////////////////////////////////////////////////////////
 // Error handling
 
-pub fn expected_found<'a,'tcx,R,T>(relation: &mut R,
-                                   a: &T,
-                                   b: &T)
-                                   -> ty::expected_found<T>
+pub fn expected_found<'a,'tcx:'a,R,T>(relation: &mut R,
+                                      a: &T,
+                                      b: &T)
+                                      -> ty::expected_found<T>
     where R: TypeRelation<'a,'tcx>, T: Clone
 {
     expected_found_bool(relation.a_is_expected(), a, b)
diff --git a/src/test/auxiliary/coherence_copy_like_lib.rs b/src/test/auxiliary/coherence_copy_like_lib.rs
index a1e1b48c2c4..d3d389c6a8b 100644
--- a/src/test/auxiliary/coherence_copy_like_lib.rs
+++ b/src/test/auxiliary/coherence_copy_like_lib.rs
@@ -11,9 +11,7 @@
 #![crate_type = "rlib"]
 #![feature(fundamental)]
 
-use std::marker::MarkerTrait;
-
-pub trait MyCopy : MarkerTrait { }
+pub trait MyCopy { }
 impl MyCopy for i32 { }
 
 pub struct MyStruct<T>(T);
diff --git a/src/test/compile-fail/coherence_copy_like_err_fundamental_struct.rs b/src/test/compile-fail/coherence_copy_like_err_fundamental_struct.rs
index f13175ce8e2..fcd6e5c4952 100644
--- a/src/test/compile-fail/coherence_copy_like_err_fundamental_struct.rs
+++ b/src/test/compile-fail/coherence_copy_like_err_fundamental_struct.rs
@@ -18,11 +18,9 @@
 
 extern crate coherence_copy_like_lib as lib;
 
-use std::marker::MarkerTrait;
-
 struct MyType { x: i32 }
 
-trait MyTrait : MarkerTrait { }
+trait MyTrait { }
 impl<T: lib::MyCopy> MyTrait for T { }
 
 // `MyFundamentalStruct` is declared fundamental, so we can test that
diff --git a/src/test/compile-fail/coherence_copy_like_err_fundamental_struct_ref.rs b/src/test/compile-fail/coherence_copy_like_err_fundamental_struct_ref.rs
index ae3d242af70..b5c0a7fb5f5 100644
--- a/src/test/compile-fail/coherence_copy_like_err_fundamental_struct_ref.rs
+++ b/src/test/compile-fail/coherence_copy_like_err_fundamental_struct_ref.rs
@@ -18,11 +18,9 @@
 
 extern crate coherence_copy_like_lib as lib;
 
-use std::marker::MarkerTrait;
-
 struct MyType { x: i32 }
 
-trait MyTrait : MarkerTrait { }
+trait MyTrait { }
 impl<T: lib::MyCopy> MyTrait for T { }
 
 // `MyFundamentalStruct` is declared fundamental, so we can test that
diff --git a/src/test/run-pass/coherence_copy_like.rs b/src/test/run-pass/coherence_copy_like.rs
index db9893613ad..71db5225ecc 100644
--- a/src/test/run-pass/coherence_copy_like.rs
+++ b/src/test/run-pass/coherence_copy_like.rs
@@ -15,11 +15,9 @@
 
 extern crate coherence_copy_like_lib as lib;
 
-use std::marker::MarkerTrait;
-
 struct MyType { x: i32 }
 
-trait MyTrait : MarkerTrait { }
+trait MyTrait { }
 impl<T: lib::MyCopy> MyTrait for T { }
 impl MyTrait for MyType { }
 impl<'a> MyTrait for &'a MyType { }
diff --git a/src/test/run-pass/traits-conditional-dispatch.rs b/src/test/run-pass/traits-conditional-dispatch.rs
index 0190b7b7b96..0a6b9da74f2 100644
--- a/src/test/run-pass/traits-conditional-dispatch.rs
+++ b/src/test/run-pass/traits-conditional-dispatch.rs
@@ -17,13 +17,11 @@
 #![allow(unknown_features)]
 #![feature(box_syntax)]
 
-use std::marker::MarkerTrait;
-
 trait Get {
     fn get(&self) -> Self;
 }
 
-trait MyCopy : MarkerTrait { fn copy(&self) -> Self; }
+trait MyCopy { fn copy(&self) -> Self; }
 impl MyCopy for u16 { fn copy(&self) -> Self { *self } }
 impl MyCopy for u32 { fn copy(&self) -> Self { *self } }
 impl MyCopy for i32 { fn copy(&self) -> Self { *self } }