diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-01-24 17:17:06 +0200 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-01-28 02:56:46 +0200 |
| commit | c5befdc6308f8624b4b5fa8808ba0af70d2fbcf1 (patch) | |
| tree | d51c98b176554154537932b44426cfdc02c3d7f4 /src/test/compile-fail | |
| parent | 41553d6fbc36ee05364dcdccf43e8b8141a5cfe3 (diff) | |
rustc: always keep an explicit lifetime in trait objects.
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/region-bounds-on-objects-and-type-parameters.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/compile-fail/region-bounds-on-objects-and-type-parameters.rs b/src/test/compile-fail/region-bounds-on-objects-and-type-parameters.rs index b8cbbdbe9ec..503b577b1f1 100644 --- a/src/test/compile-fail/region-bounds-on-objects-and-type-parameters.rs +++ b/src/test/compile-fail/region-bounds-on-objects-and-type-parameters.rs @@ -18,7 +18,7 @@ trait SomeTrait { } // Bounds on object types: -struct Foo<'a,'b,'c> { +struct Foo<'a,'b,'c> { //~ ERROR parameter `'b` is never used // All of these are ok, because we can derive exactly one bound: a: Box<IsStatic>, b: Box<Is<'static>>, @@ -28,7 +28,9 @@ struct Foo<'a,'b,'c> { f: Box<SomeTrait>, // OK, defaults to 'static due to RFC 599. g: Box<SomeTrait+'a>, - z: Box<Is<'a>+'b+'c>, //~ ERROR only a single explicit lifetime bound is permitted + z: Box<Is<'a>+'b+'c>, + //~^ ERROR only a single explicit lifetime bound is permitted + //~| ERROR lifetime bound not satisfied } fn test< |
