Skip to content

Commit

Permalink
Merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Apr 2, 2015
1 parent 38fdd50 commit c2dba85
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 33 deletions.
36 changes: 18 additions & 18 deletions src/librustc/middle/ty_relate/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions src/test/auxiliary/coherence_copy_like_lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/coherence_copy_like.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 { }
Expand Down
4 changes: 1 addition & 3 deletions src/test/run-pass/traits-conditional-dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 } }
Expand Down

0 comments on commit c2dba85

Please sign in to comment.