]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-variance-invariant-use-contravariant.stderr
Auto merge of #60093 - GuillaumeGomez:fix-attrs-pos, r=Manishearth
[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;
10    |                                ^ ...but data from `s` flows into `c` here
11
12 error: aborting due to previous error
13