diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-06-24 10:17:31 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-07-03 19:42:55 -0400 |
| commit | db5f3bc65c5f67806df531eadafdc86f8bf7f5e0 (patch) | |
| tree | c3c4cd297366df5eb161f7585ee6706dff752041 /src | |
| parent | 65a456df430260cc4c0a8ef189b764c34153d435 (diff) | |
| download | rust-db5f3bc65c5f67806df531eadafdc86f8bf7f5e0.tar.gz rust-db5f3bc65c5f67806df531eadafdc86f8bf7f5e0.zip | |
Fix some merge conflicts
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc/middle/ty.rs | 2 | ||||
| -rw-r--r-- | src/librustc/util/ppaux.rs | 19 | ||||
| -rw-r--r-- | src/test/compile-fail/object-lifetime-default.rs | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index f8b00ba153f..544e594dd21 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -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), } } diff --git a/src/librustc/util/ppaux.rs b/src/librustc/util/ppaux.rs index c4fe16805fa..44bea1cb621 100644 --- a/src/librustc/util/ppaux.rs +++ b/src/librustc/util/ppaux.rs @@ -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(()) diff --git a/src/test/compile-fail/object-lifetime-default.rs b/src/test/compile-fail/object-lifetime-default.rs index ff4d5c48745..104e10f3207 100644 --- a/src/test/compile-fail/object-lifetime-default.rs +++ b/src/test/compile-fail/object-lifetime-default.rs @@ -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() { } |
