Skip to content

Commit

Permalink
Fix some merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis committed Jul 3, 2015
1 parent 65a456d commit db5f3bc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/librustc/middle/ty.rs
Expand Up @@ -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),
}
}
Expand Down
19 changes: 10 additions & 9 deletions src/librustc/util/ppaux.rs
Expand Up @@ -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(())
Expand Down
2 changes: 1 addition & 1 deletion src/test/compile-fail/object-lifetime-default.rs
Expand Up @@ -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() { }

0 comments on commit db5f3bc

Please sign in to comment.