about summary refs log tree commit diff
path: root/tests/ui/parser/issues/issue-73568-lifetime-after-mut.stderr
blob: 2f8728bd78b4f4572dd5b3e73d7c31a80f2adb25 (plain)
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
error: lifetime must precede `mut`
  --> $DIR/issue-73568-lifetime-after-mut.rs:2:13
   |
LL | fn x<'a>(x: &mut 'a i32){}
   |             ^^^^^^^
   |
help: place the lifetime before `mut`
   |
LL | fn x<'a>(x: &'a mut i32){}
   |             ~~~~~~~

error[E0178]: expected a path on the left-hand side of `+`, not `&mut 'a`
  --> $DIR/issue-73568-lifetime-after-mut.rs:14:13
   |
LL | fn y<'a>(y: &mut 'a + Send) {
   |             ^^^^^^^^^^^^^^
   |
help: try adding parentheses
   |
LL | fn y<'a>(y: &mut ('a + Send)) {
   |                  +         +

error: lifetime must precede `mut`
  --> $DIR/issue-73568-lifetime-after-mut.rs:6:22
   |
LL |         fn w<$lt>(w: &mut $lt i32) {}
   |                      ^^^^^^^^
...
LL | mac!('a);
   | -------- in this macro invocation
   |
   = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
help: place the lifetime before `mut`
   |
LL |         fn w<$lt>(w: &$lt mut i32) {}
   |                      ~~~~~~~~

error[E0423]: expected value, found trait `Send`
  --> $DIR/issue-73568-lifetime-after-mut.rs:17:28
   |
LL |     let z = y as &mut 'a + Send;
   |                            ^^^^ not a value

error[E0224]: at least one trait is required for an object type
  --> $DIR/issue-73568-lifetime-after-mut.rs:14:18
   |
LL | fn y<'a>(y: &mut 'a + Send) {
   |                  ^^

error[E0224]: at least one trait is required for an object type
  --> $DIR/issue-73568-lifetime-after-mut.rs:17:23
   |
LL |     let z = y as &mut 'a + Send;
   |                       ^^

error: aborting due to 6 previous errors

Some errors have detailed explanations: E0178, E0224, E0423.
For more information about an error, try `rustc --explain E0178`.