Skip to content

Commit d20be6d

Browse files
committed
---
yaml --- r: 218300 b: refs/heads/beta c: 973193b h: refs/heads/master v: v3
1 parent c46dc83 commit d20be6d

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: db75b07d594d381116739e9045421523ae26dca3
26+
refs/heads/beta: 973193b7cc8dc62a7317a14056403522da6e7820
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 50df2a09b8b9dd4883eb27d833a8482799175a3b
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/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
}

branches/beta/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(())

branches/beta/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)