Fix some merge conflicts

This commit is contained in:
Niko Matsakis 2015-06-24 10:17:31 -04:00
parent 65a456df43
commit db5f3bc65c
3 changed files with 12 additions and 11 deletions

View File

@ -7336,7 +7336,7 @@ impl<'tcx> fmt::Debug for ObjectLifetimeDefault {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
ObjectLifetimeDefault::Ambiguous => write!(f, "Ambiguous"),
ObjectLifetimeDefault::BaseDefault => format!("BaseDefault"),
ObjectLifetimeDefault::BaseDefault => write!(f, "BaseDefault"),
ObjectLifetimeDefault::Specific(ref r) => write!(f, "{:?}", r),
}
}

View File

@ -290,17 +290,18 @@ impl<'tcx> fmt::Display for ty::TraitTy<'tcx> {
try!(write!(f, " + {:?}", bound));
}
// Region, if not obviously implied by builtin bounds.
if bounds.region_bound != ty::ReStatic {
// Region bound is implied by builtin bounds:
let bound = bounds.region_bound.to_string();
if !bound.is_empty() {
try!(write!(f, " + {}", bound));
}
// FIXME: It'd be nice to compute from context when this bound
// is implied, but that's non-trivial -- we'd perhaps have to
// use thread-local data of some kind? There are also
// advantages to just showing the region, since it makes
// people aware that it's there.
let bound = bounds.region_bound.to_string();
if !bound.is_empty() {
try!(write!(f, " + {}", bound));
}
if bounds.region_bound_will_change && tcx.sess.verbose() {
components.push(format!("WILL-CHANGE"));
if bounds.region_bound_will_change && verbose() {
try!(write!(f, " [WILL-CHANGE]"));
}
Ok(())

View File

@ -29,6 +29,6 @@ struct E<'a,'b:'a,T:'b>(&'a T, &'b T); //~ ERROR 'b
struct F<'a,'b,T:'a,U:'b>(&'a T, &'b U); //~ ERROR 'a,'b
#[rustc_object_lifetime_default]
struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); //~ ERROR 'a,Some(Ambiguous)
struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); //~ ERROR 'a,Ambiguous
fn main() { }