]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-infer-invariance-due-to-decl.stderr
Apply suggestions from code review
[rust.git] / src / test / ui / regions / regions-infer-invariance-due-to-decl.stderr
1 error[E0308]: mismatched types
2   --> $DIR/regions-infer-invariance-due-to-decl.rs:12:5
3    |
4 LL |     b_isize
5    |     ^^^^^^^ lifetime mismatch
6    |
7    = note: expected struct `Invariant<'static>`
8               found struct `Invariant<'r>`
9 note: the lifetime `'r` as defined on the function body at 11:23...
10   --> $DIR/regions-infer-invariance-due-to-decl.rs:11:23
11    |
12 LL | fn to_longer_lifetime<'r>(b_isize: Invariant<'r>) -> Invariant<'static> {
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`.