fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
646 B18 linesraw
1error[E0308]: mismatched types
2  --> $DIR/regions-variance-invariant-use-covariant.rs:17:33
3   |
4LL |     let _: Invariant<'static> = c;
5   |                                 ^ lifetime mismatch
6   |
7   = note: expected struct `Invariant<'static>`
8              found struct `Invariant<'b>`
9note: the lifetime `'b` as defined on the function body at 11:9...
10  --> $DIR/regions-variance-invariant-use-covariant.rs:11:9
11   |
12LL | fn use_<'b>(c: Invariant<'b>) {
13   |         ^^
14   = note: ...does not necessarily outlive the static lifetime
15
16error: aborting due to previous error
17
18For more information about this error, try `rustc --explain E0308`.