diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-05-11 15:05:00 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-05-13 17:42:59 +0300 |
| commit | 2da080e779b4e6f4359c031824c3bdcedad452fd (patch) | |
| tree | 891c3e4d560110edf05dbace4c47d767b13aa06e /src/test | |
| parent | dbae169ac16de632d21fd3394bc8a939b2524512 (diff) | |
| download | rust-2da080e779b4e6f4359c031824c3bdcedad452fd.tar.gz rust-2da080e779b4e6f4359c031824c3bdcedad452fd.zip | |
rustc: treat ReEarlyBound as free without replacing it with ReFree.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/issue-27942.rs | 7 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-37884.rs | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/test/compile-fail/issue-27942.rs b/src/test/compile-fail/issue-27942.rs index 595e4bfb0d7..22e7de3838d 100644 --- a/src/test/compile-fail/issue-27942.rs +++ b/src/test/compile-fail/issue-27942.rs @@ -11,17 +11,18 @@ pub trait Resources<'a> {} pub trait Buffer<'a, R: Resources<'a>> { + //~^ NOTE the lifetime 'a as defined on the trait at 13:0... + //~| NOTE ...does not necessarily outlive the lifetime 'a as defined on the trait + fn select(&self) -> BufferViewHandle<R>; //~^ ERROR mismatched types //~| lifetime mismatch //~| NOTE expected type `Resources<'_>` - //~| NOTE the lifetime 'a as defined on the method body at 14:4... //~| NOTE ...does not necessarily outlive the anonymous lifetime #1 defined on the method body //~| ERROR mismatched types //~| lifetime mismatch //~| NOTE expected type `Resources<'_>` - //~| NOTE the anonymous lifetime #1 defined on the method body at 14:4... - //~| NOTE ...does not necessarily outlive the lifetime 'a as defined on the method body + //~| NOTE the anonymous lifetime #1 defined on the method body at 17:4... } pub struct BufferViewHandle<'a, R: 'a+Resources<'a>>(&'a R); diff --git a/src/test/compile-fail/issue-37884.rs b/src/test/compile-fail/issue-37884.rs index 28ce79ab5aa..6313293bf2b 100644 --- a/src/test/compile-fail/issue-37884.rs +++ b/src/test/compile-fail/issue-37884.rs @@ -11,13 +11,14 @@ struct RepeatMut<'a, T>(T, &'a ()); impl<'a, T: 'a> Iterator for RepeatMut<'a, T> { + //~^ NOTE ...does not necessarily outlive the lifetime 'a as defined on the impl + type Item = &'a mut T; fn next(&'a mut self) -> Option<Self::Item> //~^ ERROR method not compatible with trait //~| lifetime mismatch //~| NOTE expected type `fn(&mut RepeatMut<'a, T>) -> std::option::Option<&mut T>` //~| NOTE the anonymous lifetime #1 defined on the method body - //~| NOTE ...does not necessarily outlive the lifetime 'a as defined on the method body { Some(&mut self.0) } |
