]> git.proxmox.com Git - rustc.git/blame - tests/ui/async-await/in-trait/async-generics-and-bounds.stderr
New upstream version 1.75.0+dfsg1
[rustc.git] / tests / ui / async-await / in-trait / async-generics-and-bounds.stderr
CommitLineData
2b03887a 1error[E0311]: the parameter type `U` may not live long enough
ed00b5ec 2 --> $DIR/async-generics-and-bounds.rs:9:5
2b03887a
FG
3 |
4LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
ed00b5ec
FG
5 | ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6 | | |
7 | | the parameter type `U` must be valid for the anonymous lifetime as defined here...
8 | ...so that the reference type `&(T, U)` does not outlive the data it points at
2b03887a 9 |
ed00b5ec 10help: consider adding an explicit lifetime bound
2b03887a 11 |
ed00b5ec
FG
12LL | async fn foo<'a>(&'a self) -> &'a (T, U) where T: Debug + Sized, U: Hash, U: 'a;
13 | ++++ ++ ++ +++++++
2b03887a
FG
14
15error[E0311]: the parameter type `T` may not live long enough
ed00b5ec 16 --> $DIR/async-generics-and-bounds.rs:9:5
2b03887a
FG
17 |
18LL | async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
ed00b5ec
FG
19 | ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 | | |
21 | | the parameter type `T` must be valid for the anonymous lifetime as defined here...
22 | ...so that the reference type `&(T, U)` does not outlive the data it points at
2b03887a 23 |
ed00b5ec 24help: consider adding an explicit lifetime bound
2b03887a 25 |
ed00b5ec
FG
26LL | async fn foo<'a>(&'a self) -> &'a (T, U) where T: Debug + Sized, U: Hash, T: 'a;
27 | ++++ ++ ++ +++++++
2b03887a
FG
28
29error: aborting due to 2 previous errors
30
31For more information about this error, try `rustc --explain E0311`.