fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #67350 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum73528e339aa

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