]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2093-infer-outlives/dont-infer-static.stderr
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / rfc-2093-infer-outlives / dont-infer-static.stderr
1 error[E0310]: the parameter type `U` may not live long enough
2   --> $DIR/dont-infer-static.rs:6:10
3    |
4 LL |     bar: Bar<U>
5    |          ^^^^^^ ...so that the type `U` will meet its required lifetime bounds...
6    |
7 note: ...that is required by this bound
8   --> $DIR/dont-infer-static.rs:8:15
9    |
10 LL | struct Bar<T: 'static> {
11    |               ^^^^^^^
12 help: consider adding an explicit lifetime bound...
13    |
14 LL | struct Foo<U: 'static> {
15    |             +++++++++
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0310`.