File: issue-82126-mismatched-subst-and-hir.stderr

package info (click to toggle)
rustc 1.89.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 906,624 kB
  • sloc: xml: 158,148; python: 34,888; javascript: 19,595; sh: 19,221; ansic: 13,046; cpp: 7,144; asm: 4,376; makefile: 692; lisp: 174; sql: 15
file content (65 lines) | stat: -rw-r--r-- 3,078 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
   |
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
   |                                                           ^^^^^^^^^^^^---- help: remove the unnecessary generics
   |                                                           |
   |                                                           expected 0 lifetime arguments
   |
note: struct defined here, with 0 lifetime parameters
  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
   |
LL | struct LockedMarket<T>(T);
   |        ^^^^^^^^^^^^

error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
   |
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
   |                                                           ^^^^^^^^^^^^ expected 1 generic argument
   |
note: struct defined here, with 1 generic parameter: `T`
  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
   |
LL | struct LockedMarket<T>(T);
   |        ^^^^^^^^^^^^ -
help: add missing generic argument
   |
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_, T> {
   |                                                                          +++

error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
   |
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
   |                                                           ^^^^^^^^^^^^---- help: remove the unnecessary generics
   |                                                           |
   |                                                           expected 0 lifetime arguments
   |
note: struct defined here, with 0 lifetime parameters
  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
   |
LL | struct LockedMarket<T>(T);
   |        ^^^^^^^^^^^^
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
   |
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
   |                                                           ^^^^^^^^^^^^ expected 1 generic argument
   |
note: struct defined here, with 1 generic parameter: `T`
  --> $DIR/issue-82126-mismatched-subst-and-hir.rs:24:8
   |
LL | struct LockedMarket<T>(T);
   |        ^^^^^^^^^^^^ -
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
help: add missing generic argument
   |
LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_, T> {
   |                                                                          +++

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0107`.