]> git.lizzy.rs Git - rust.git/blob - src/test/ui/regions/regions-assoc-type-in-supertrait-outlives-container.stderr
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / regions / regions-assoc-type-in-supertrait-outlives-container.stderr
1 error[E0491]: in type `&'a WithAssoc<TheType<'b>>`, reference has a longer lifetime than the data it references
2   --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:42:13
3    |
4 LL |     let _x: &'a WithAssoc<TheType<'b>> = loop { };
5    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
6    |
7 note: the pointer is valid for the lifetime 'a as defined on the function body at 34:15
8   --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:34:15
9    |
10 LL | fn with_assoc<'a,'b>() {
11    |               ^^
12 note: but the referenced data is only valid for the lifetime 'b as defined on the function body at 34:18
13   --> $DIR/regions-assoc-type-in-supertrait-outlives-container.rs:34:18
14    |
15 LL | fn with_assoc<'a,'b>() {
16    |                  ^^
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0491`.