From c2dba8580a5e472cc3344792030306130b1e5636 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 2 Apr 2015 13:24:44 -0400 Subject: [PATCH] Merge conflicts --- src/librustc/middle/ty_relate/mod.rs | 36 +++++++++---------- src/test/auxiliary/coherence_copy_like_lib.rs | 4 +-- ...erence_copy_like_err_fundamental_struct.rs | 4 +-- ...ce_copy_like_err_fundamental_struct_ref.rs | 4 +-- src/test/run-pass/coherence_copy_like.rs | 4 +-- .../run-pass/traits-conditional-dispatch.rs | 4 +-- 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 1205b7d957930..3a55a64314ed9 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>> +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>> 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>> +fn relate_arg_vecs<'a,'tcx:'a,R>(relation: &mut R, + a_args: &[Ty<'tcx>], + b_args: &[Ty<'tcx>]) + -> RelateResult<'tcx, Vec>> 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 /////////////////////////////////////////////////////////////////////////// // Error handling -pub fn expected_found<'a,'tcx,R,T>(relation: &mut R, - a: &T, - b: &T) - -> ty::expected_found +pub fn expected_found<'a,'tcx:'a,R,T>(relation: &mut R, + a: &T, + b: &T) + -> ty::expected_found 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 a1e1b48c2c4e9..d3d389c6a8bd5 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); 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 f13175ce8e2a4..fcd6e5c495207 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 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 ae3d242af705e..b5c0a7fb5f564 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 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 db9893613ad11..71db5225ecc08 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 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 0190b7b7b9628..0a6b9da74f218 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 } }