Skip to content

Commit db5f3bc

Browse files
committed
Fix some merge conflicts
1 parent 65a456d commit db5f3bc

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/librustc/middle/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7336,7 +7336,7 @@ impl<'tcx> fmt::Debug for ObjectLifetimeDefault {
73367336
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
73377337
match *self {
73387338
ObjectLifetimeDefault::Ambiguous => write!(f, "Ambiguous"),
7339-
ObjectLifetimeDefault::BaseDefault => format!("BaseDefault"),
7339+
ObjectLifetimeDefault::BaseDefault => write!(f, "BaseDefault"),
73407340
ObjectLifetimeDefault::Specific(ref r) => write!(f, "{:?}", r),
73417341
}
73427342
}

src/librustc/util/ppaux.rs

+10-9
Original file line numberDiff line numberDiff line change
@@ -290,17 +290,18 @@ impl<'tcx> fmt::Display for ty::TraitTy<'tcx> {
290290
try!(write!(f, " + {:?}", bound));
291291
}
292292

293-
// Region, if not obviously implied by builtin bounds.
294-
if bounds.region_bound != ty::ReStatic {
295-
// Region bound is implied by builtin bounds:
296-
let bound = bounds.region_bound.to_string();
297-
if !bound.is_empty() {
298-
try!(write!(f, " + {}", bound));
299-
}
293+
// FIXME: It'd be nice to compute from context when this bound
294+
// is implied, but that's non-trivial -- we'd perhaps have to
295+
// use thread-local data of some kind? There are also
296+
// advantages to just showing the region, since it makes
297+
// people aware that it's there.
298+
let bound = bounds.region_bound.to_string();
299+
if !bound.is_empty() {
300+
try!(write!(f, " + {}", bound));
300301
}
301302

302-
if bounds.region_bound_will_change && tcx.sess.verbose() {
303-
components.push(format!("WILL-CHANGE"));
303+
if bounds.region_bound_will_change && verbose() {
304+
try!(write!(f, " [WILL-CHANGE]"));
304305
}
305306

306307
Ok(())

src/test/compile-fail/object-lifetime-default.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ struct E<'a,'b:'a,T:'b>(&'a T, &'b T); //~ ERROR 'b
2929
struct F<'a,'b,T:'a,U:'b>(&'a T, &'b U); //~ ERROR 'a,'b
3030

3131
#[rustc_object_lifetime_default]
32-
struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); //~ ERROR 'a,Some(Ambiguous)
32+
struct G<'a,'b,T:'a,U:'a+'b>(&'a T, &'b U); //~ ERROR 'a,Ambiguous
3333

3434
fn main() { }

0 commit comments

Comments
 (0)