]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-27942.stderr
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-27942.stderr
1 error[E0308]: mismatched types
2   --> $DIR/issue-27942.rs:15:5
3    |
4 LL |     fn select(&self) -> BufferViewHandle<R>;
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
6    |
7    = note: expected type `Resources<'_>`
8               found type `Resources<'a>`
9 note: the anonymous lifetime #1 defined on the method body at 15:5...
10   --> $DIR/issue-27942.rs:15:5
11    |
12 LL |     fn select(&self) -> BufferViewHandle<R>;
13    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14 note: ...does not necessarily outlive the lifetime 'a as defined on the trait at 13:18
15   --> $DIR/issue-27942.rs:13:18
16    |
17 LL | pub trait Buffer<'a, R: Resources<'a>> {
18    |                  ^^
19
20 error[E0308]: mismatched types
21   --> $DIR/issue-27942.rs:15:5
22    |
23 LL |     fn select(&self) -> BufferViewHandle<R>;
24    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
25    |
26    = note: expected type `Resources<'_>`
27               found type `Resources<'a>`
28 note: the lifetime 'a as defined on the trait at 13:18...
29   --> $DIR/issue-27942.rs:13:18
30    |
31 LL | pub trait Buffer<'a, R: Resources<'a>> {
32    |                  ^^
33 note: ...does not necessarily outlive the anonymous lifetime #1 defined on the method body at 15:5
34   --> $DIR/issue-27942.rs:15:5
35    |
36 LL |     fn select(&self) -> BufferViewHandle<R>;
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38
39 error: aborting due to 2 previous errors
40
41 For more information about this error, try `rustc --explain E0308`.