fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
3.7 KiB107 linesraw
1error[E0637]: `&` without an explicit lifetime name cannot be used here
2  --> $DIR/implicit-stuff.rs:20:23
3   |
4LL |     let _ = for<> |_: &()| -> () {};
5   |                       ^ explicit lifetime name needed here
6
7error[E0637]: `&` without an explicit lifetime name cannot be used here
8  --> $DIR/implicit-stuff.rs:21:23
9   |
10LL |     let _ = for<> |x: &()| -> &() { x };
11   |                       ^ explicit lifetime name needed here
12
13error[E0637]: `&` without an explicit lifetime name cannot be used here
14  --> $DIR/implicit-stuff.rs:21:31
15   |
16LL |     let _ = for<> |x: &()| -> &() { x };
17   |                               ^ explicit lifetime name needed here
18
19error[E0637]: `'_` cannot be used here
20  --> $DIR/implicit-stuff.rs:23:24
21   |
22LL |     let _ = for<> |x: &'_ ()| -> &'_ () { x };
23   |                        ^^ `'_` is a reserved lifetime name
24
25error[E0637]: `'_` cannot be used here
26  --> $DIR/implicit-stuff.rs:23:35
27   |
28LL |     let _ = for<> |x: &'_ ()| -> &'_ () { x };
29   |                                   ^^ `'_` is a reserved lifetime name
30
31error[E0637]: `&` without an explicit lifetime name cannot be used here
32  --> $DIR/implicit-stuff.rs:25:25
33   |
34LL |     let _ = for<'a> |x: &()| -> &'a () { x };
35   |                         ^ explicit lifetime name needed here
36
37error[E0637]: `&` without an explicit lifetime name cannot be used here
38  --> $DIR/implicit-stuff.rs:26:36
39   |
40LL |     let _ = for<'a> |x: &'a ()| -> &() { x };
41   |                                    ^ explicit lifetime name needed here
42
43error: implicit types in closure signatures are forbidden when `for<...>` is present
44  --> $DIR/implicit-stuff.rs:5:21
45   |
46LL |     let _ = for<> || {};
47   |             -----   ^
48   |             |
49   |             `for<...>` is here
50
51error: implicit types in closure signatures are forbidden when `for<...>` is present
52  --> $DIR/implicit-stuff.rs:6:31
53   |
54LL |     let _ = for<'a> || -> &'a _ { &() };
55   |             -------           ^
56   |             |
57   |             `for<...>` is here
58
59error: implicit types in closure signatures are forbidden when `for<...>` is present
60  --> $DIR/implicit-stuff.rs:7:22
61   |
62LL |     let _ = for<'a> |x| -> &'a () { x };
63   |             -------  ^
64   |             |
65   |             `for<...>` is here
66
67error: implicit types in closure signatures are forbidden when `for<...>` is present
68  --> $DIR/implicit-stuff.rs:8:29
69   |
70LL |     let _ = for<'a> |x: &'a _| -> &'a () { x };
71   |             -------         ^
72   |             |
73   |             `for<...>` is here
74
75error: implicit types in closure signatures are forbidden when `for<...>` is present
76  --> $DIR/implicit-stuff.rs:9:35
77   |
78LL |     let _ = for<'a> |x: &'a Vec::<_>| -> &'a Vec::<()> { x };
79   |             -------               ^
80   |             |
81   |             `for<...>` is here
82
83error: implicit types in closure signatures are forbidden when `for<...>` is present
84  --> $DIR/implicit-stuff.rs:10:49
85   |
86LL |     let _ = for<'a> |x: &'a Vec<()>| -> &'a Vec<_> { x };
87   |             ------- `for<...>` is here          ^
88
89error: implicit types in closure signatures are forbidden when `for<...>` is present
90  --> $DIR/implicit-stuff.rs:11:29
91   |
92LL |     let _ = for<'a> |x: &'a _| -> &'a &'a () { x };
93   |             -------         ^
94   |             |
95   |             `for<...>` is here
96
97error: implicit types in closure signatures are forbidden when `for<...>` is present
98  --> $DIR/implicit-stuff.rs:12:29
99   |
100LL |     let _ = for<'a> |x: &'a _, y, z: _| -> &'a _ {
101   |             -------         ^  ^     ^         ^
102   |             |
103   |             `for<...>` is here
104
105error: aborting due to 15 previous errors
106
107For more information about this error, try `rustc --explain E0637`.