Skip to content

Commit 973193b

Browse files
committed
Fix some merge conflicts
1 parent db75b07 commit 973193b

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7772,7 +7772,7 @@ impl<'tcx> fmt::Debug for ObjectLifetimeDefault {
77727772
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
77737773
match *self {
77747774
ObjectLifetimeDefault::Ambiguous => write!(f, "Ambiguous"),
7775-
ObjectLifetimeDefault::BaseDefault => format!("BaseDefault"),
7775+
ObjectLifetimeDefault::BaseDefault => write!(f, "BaseDefault"),
77767776
ObjectLifetimeDefault::Specific(ref r) => write!(f, "{:?}", r),
77777777
}
77787778
}

src/librustc/util/ppaux.rs

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

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

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

307308
Ok(())

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

Lines changed: 1 addition & 1 deletion
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)