File: pat-at-same-name-both.stderr

package info (click to toggle)
rustc 1.88.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 934,128 kB
  • sloc: xml: 158,127; python: 36,062; javascript: 19,855; sh: 19,700; cpp: 18,947; ansic: 12,993; asm: 4,792; makefile: 690; lisp: 29; perl: 29; ruby: 19; sql: 11
file content (90 lines) | stat: -rw-r--r-- 3,128 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
error[E0415]: identifier `a` is bound more than once in this parameter list
  --> $DIR/pat-at-same-name-both.rs:6:14
   |
LL |     fn f(a @ a @ a: ()) {}
   |              ^ used as parameter more than once

error[E0415]: identifier `a` is bound more than once in this parameter list
  --> $DIR/pat-at-same-name-both.rs:6:18
   |
LL |     fn f(a @ a @ a: ()) {}
   |                  ^ used as parameter more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/pat-at-same-name-both.rs:11:20
   |
LL |         Ok(a @ b @ a)
   |                    ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/pat-at-same-name-both.rs:13:23
   |
LL |         | Err(a @ b @ a)
   |                       ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/pat-at-same-name-both.rs:18:13
   |
LL |     let a @ a @ a = ();
   |             ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/pat-at-same-name-both.rs:18:17
   |
LL |     let a @ a @ a = ();
   |                 ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/pat-at-same-name-both.rs:21:21
   |
LL |     let ref a @ ref a = ();
   |                     ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/pat-at-same-name-both.rs:23:29
   |
LL |     let ref mut a @ ref mut a = ();
   |                             ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/pat-at-same-name-both.rs:26:17
   |
LL |     let a @ (Ok(a) | Err(a)) = Ok(());
   |                 ^ used in a pattern more than once

error[E0416]: identifier `a` is bound more than once in the same pattern
  --> $DIR/pat-at-same-name-both.rs:26:26
   |
LL |     let a @ (Ok(a) | Err(a)) = Ok(());
   |                          ^ used in a pattern more than once

error: cannot borrow value as mutable more than once at a time
  --> $DIR/pat-at-same-name-both.rs:23:9
   |
LL |     let ref mut a @ ref mut a = ();
   |         ^^^^^^^^^   --------- value is mutably borrowed by `a` here
   |         |
   |         value is mutably borrowed by `a` here

error[E0384]: cannot assign twice to immutable variable `a`
  --> $DIR/pat-at-same-name-both.rs:13:15
   |
LL |         Ok(a @ b @ a)
   |                    - first assignment to `a`
LL |
LL |         | Err(a @ b @ a)
   |               ^ cannot assign twice to immutable variable
   |
help: consider making this binding mutable
   |
LL |         Ok(a @ b @ mut a)
   |                    +++
help: to modify the original value, take a borrow instead
   |
LL |         Ok(a @ b @ ref mut a)
   |                    +++++++

error: aborting due to 12 previous errors

Some errors have detailed explanations: E0384, E0415, E0416.
For more information about an error, try `rustc --explain E0384`.