]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-variance-invariant-use-covariant.stderr
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / regions / regions-variance-invariant-use-covariant.stderr
1 error[E0308]: mismatched types
2   --> $DIR/regions-variance-invariant-use-covariant.rs:17:33
3    |
4 LL |     let _: Invariant<'static> = c; //~ ERROR mismatched types
5    |                                 ^ lifetime mismatch
6    |
7    = note: expected type `Invariant<'static>`
8               found type `Invariant<'b>`
9 note: the lifetime 'b as defined on the function body at 11:9...
10   --> $DIR/regions-variance-invariant-use-covariant.rs:11:9
11    |
12 LL | fn use_<'b>(c: Invariant<'b>) {
13    |         ^^
14    = note: ...does not necessarily outlive the static lifetime
15
16 error: aborting due to previous error
17
18 For more information about this error, try `rustc --explain E0308`.