]> git.proxmox.com Git - rustc.git/blame - src/test/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / borrowck / issue-82126-mismatched-subst-and-hir.stderr
CommitLineData
6a06907d
XL
1error[E0107]: this struct takes 0 lifetime arguments but 1 lifetime argument was supplied
2 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
3 |
4LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
5 | ^^^^^^^^^^^^---- help: remove these generics
6 | |
7 | expected 0 lifetime arguments
8 |
9note: struct defined here, with 0 lifetime parameters
10 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:23:8
11 |
12LL | struct LockedMarket<T>(T);
13 | ^^^^^^^^^^^^
14
15error[E0107]: this struct takes 1 type argument but 0 type arguments were supplied
16 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
17 |
18LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
19 | ^^^^^^^^^^^^ expected 1 type argument
20 |
21note: struct defined here, with 1 type parameter: `T`
22 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:23:8
23 |
24LL | struct LockedMarket<T>(T);
25 | ^^^^^^^^^^^^ -
26help: add missing type argument
27 |
28LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_, T> {
29 | ^^^
30
31error[E0515]: cannot return value referencing temporary value
32 --> $DIR/issue-82126-mismatched-subst-and-hir.rs:19:5
33 |
34LL | LockedMarket(generator.lock().unwrap().buy())
35 | ^^^^^^^^^^^^^-------------------------^^^^^^^
36 | | |
37 | | temporary value created here
38 | returns a value referencing data owned by the current function
39
40error: aborting due to 3 previous errors
41
42Some errors have detailed explanations: E0107, E0515.
43For more information about an error, try `rustc --explain E0107`.