File: implicit-stuff.stderr

package info (click to toggle)
rustc 1.87.0%2Bdfsg1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 925,564 kB
  • sloc: xml: 158,127; python: 36,039; javascript: 19,761; sh: 19,737; cpp: 18,981; ansic: 13,133; asm: 4,376; makefile: 710; perl: 29; lisp: 28; ruby: 19; sql: 11
file content (116 lines) | stat: -rw-r--r-- 4,192 bytes parent folder | download | duplicates (16)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
error[E0637]: `&` without an explicit lifetime name cannot be used here
  --> $DIR/implicit-stuff.rs:20:23
   |
LL |     let _ = for<> |_: &()| -> () {};
   |                       ^ explicit lifetime name needed here

error[E0637]: `&` without an explicit lifetime name cannot be used here
  --> $DIR/implicit-stuff.rs:21:23
   |
LL |     let _ = for<> |x: &()| -> &() { x };
   |                       ^ explicit lifetime name needed here

error[E0637]: `&` without an explicit lifetime name cannot be used here
  --> $DIR/implicit-stuff.rs:21:31
   |
LL |     let _ = for<> |x: &()| -> &() { x };
   |                               ^ explicit lifetime name needed here

error[E0637]: `'_` cannot be used here
  --> $DIR/implicit-stuff.rs:23:24
   |
LL |     let _ = for<> |x: &'_ ()| -> &'_ () { x };
   |                        ^^ `'_` is a reserved lifetime name

error[E0637]: `'_` cannot be used here
  --> $DIR/implicit-stuff.rs:23:35
   |
LL |     let _ = for<> |x: &'_ ()| -> &'_ () { x };
   |                                   ^^ `'_` is a reserved lifetime name

error[E0637]: `&` without an explicit lifetime name cannot be used here
  --> $DIR/implicit-stuff.rs:25:25
   |
LL |     let _ = for<'a> |x: &()| -> &'a () { x };
   |                         ^ explicit lifetime name needed here

error[E0637]: `&` without an explicit lifetime name cannot be used here
  --> $DIR/implicit-stuff.rs:26:36
   |
LL |     let _ = for<'a> |x: &'a ()| -> &() { x };
   |                                    ^ explicit lifetime name needed here

error: implicit types in closure signatures are forbidden when `for<...>` is present
  --> $DIR/implicit-stuff.rs:5:21
   |
LL |     let _ = for<> || {};
   |             -----   ^
   |             |
   |             `for<...>` is here

error: implicit types in closure signatures are forbidden when `for<...>` is present
  --> $DIR/implicit-stuff.rs:6:31
   |
LL |     let _ = for<'a> || -> &'a _ { &() };
   |             -------           ^
   |             |
   |             `for<...>` is here

error: implicit types in closure signatures are forbidden when `for<...>` is present
  --> $DIR/implicit-stuff.rs:7:22
   |
LL |     let _ = for<'a> |x| -> &'a () { x };
   |             -------  ^
   |             |
   |             `for<...>` is here

error: implicit types in closure signatures are forbidden when `for<...>` is present
  --> $DIR/implicit-stuff.rs:8:29
   |
LL |     let _ = for<'a> |x: &'a _| -> &'a () { x };
   |             -------         ^
   |             |
   |             `for<...>` is here

error: implicit types in closure signatures are forbidden when `for<...>` is present
  --> $DIR/implicit-stuff.rs:9:35
   |
LL |     let _ = for<'a> |x: &'a Vec::<_>| -> &'a Vec::<()> { x };
   |             -------               ^
   |             |
   |             `for<...>` is here

error: implicit types in closure signatures are forbidden when `for<...>` is present
  --> $DIR/implicit-stuff.rs:10:49
   |
LL |     let _ = for<'a> |x: &'a Vec<()>| -> &'a Vec<_> { x };
   |             ------- `for<...>` is here          ^

error: implicit types in closure signatures are forbidden when `for<...>` is present
  --> $DIR/implicit-stuff.rs:11:29
   |
LL |     let _ = for<'a> |x: &'a _| -> &'a &'a () { x };
   |             -------         ^
   |             |
   |             `for<...>` is here

error: implicit types in closure signatures are forbidden when `for<...>` is present
  --> $DIR/implicit-stuff.rs:12:29
   |
LL |     let _ = for<'a> |x: &'a _, y, z: _| -> &'a _ {
   |             -------         ^  ^     ^         ^
   |             |
   |             `for<...>` is here

error: lifetime may not live long enough
  --> $DIR/implicit-stuff.rs:26:42
   |
LL |     let _ = for<'a> |x: &'a ()| -> &() { x };
   |                 --                 -     ^ returning this value requires that `'a` must outlive `'1`
   |                 |                  |
   |                 |                  let's call the lifetime of this reference `'1`
   |                 lifetime `'a` defined here

error: aborting due to 16 previous errors

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