mirror of
https://github.com/rust-lang/rust
synced 2024-09-05 16:57:03 +00:00
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 @@ fn relate<R>(relation: &mut R,
|
|||
}
|
||||
}
|
||||
|
||||
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 @@ fn relate<R>(relation: &mut R,
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// 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 a new issue