fork/rust

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

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
825 B21 linesraw
1error[E0195]: lifetime parameters or bounds on method `get` do not match the trait declaration
2  --> $DIR/issue-16048.rs:21:11
3   |
4LL |     fn get<'p, T : Test<'p>>(&self) -> T;
5   |           ------------------ lifetimes in impl do not match this method in trait
6...
7LL |     fn get<'p, T : Test<'a>>(&self) -> T {
8   |           ^^^^^^^^^^^^^^^^^^ lifetimes do not match method in trait
9
10error[E0605]: non-primitive cast: `Foo<'a>` as `T`
11  --> $DIR/issue-16048.rs:24:16
12   |
13LL |         return *self as T;
14   |                ^^^^^^^^^^
15   |
16   = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
17
18error: aborting due to 2 previous errors
19
20Some errors have detailed explanations: E0195, E0605.
21For more information about an error, try `rustc --explain E0195`.