Skip to content

Commit 3dedc18

Browse files
committed
---
yaml --- r: 223538 b: refs/heads/beta c: db5f3bc h: refs/heads/master v: v3
1 parent 8f87adf commit 3dedc18

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: 65a456df430260cc4c0a8ef189b764c34153d435
26+
refs/heads/beta: db5f3bc65c5f67806df531eadafdc86f8bf7f5e0
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 938f5d7af401e2d8238522fed4a612943b6e77fd
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
@@ -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
}

branches/beta/src/librustc/util/ppaux.rs

Lines changed: 10 additions & 9 deletions
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(())

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)