Merge conflicts
This commit is contained in:
parent
38fdd50e0b
commit
c2dba8580a
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 { }
|
||||
|
|
|
@ -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 } }
|
||||
|
|
Loading…
Reference in New Issue