]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / regions / regions-variance-invariant-use-contravariant.stderr
1 error[E0623]: lifetime mismatch
2   --> $DIR/regions-variance-invariant-use-contravariant.rs:20:32
3    |
4 LL | fn use_<'short,'long>(c: Invariant<'long>,
5    |                          ----------------
6 LL |                       s: &'short isize,
7    |                          ------------- these two types are declared with different lifetimes...
8 ...
9 LL |     let _: Invariant<'short> = c; //~ ERROR E0623
10    |                                ^ ...but data from `s` flows into `c` here
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0623`.