diff options
Diffstat (limited to 'src/test/compile-fail/regions-early-bound-error-method.rs')
| -rw-r--r-- | src/test/compile-fail/regions-early-bound-error-method.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/compile-fail/regions-early-bound-error-method.rs b/src/test/compile-fail/regions-early-bound-error-method.rs index 0cb88b924f8..9de0ed070c7 100644 --- a/src/test/compile-fail/regions-early-bound-error-method.rs +++ b/src/test/compile-fail/regions-early-bound-error-method.rs @@ -12,21 +12,21 @@ // the value for a type parameter in a bound. trait GetRef<'a> { - fn get(&self) -> &'a int; + fn get(&self) -> &'a isize; } struct Box<'a> { - t: &'a int + t: &'a isize } impl<'a> GetRef<'a> for Box<'a> { - fn get(&self) -> &'a int { + fn get(&self) -> &'a isize { self.t } } impl<'a> Box<'a> { - fn or<'b,G:GetRef<'b>>(&self, g2: G) -> &'a int { + fn or<'b,G:GetRef<'b>>(&self, g2: G) -> &'a isize { g2.get() //~ ERROR cannot infer an appropriate lifetime for automatic coercion due to } }  | 
