aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pinned_drop/self.stderr
blob: edab117b82b7e538037302b260e5810c5096082a (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
60
61
62
error: `self` parameter is only allowed in associated functions
  --> $DIR/self.rs:17:26
   |
17 |                     fn f(self: ()) {} //~ ERROR `self` parameter is only allowed in associated functions
   |                          ^^^^ not semantically valid as function parameter
...
20 |             t!();
   |             ----- in this macro invocation
   |
   = note: associated functions are those in `impl` or `trait` definitions
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0434]: can't capture dynamic environment in a fn item
  --> $DIR/self.rs:15:29
   |
15 |                     let _ = self; //~ ERROR E0434
   |                             ^^^^
...
20 |             t!();
   |             ----- in this macro invocation
   |
   = help: use the `|| { ... }` closure form instead
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0423]: expected value, found struct `S`
  --> $DIR/self.rs:38:27
   |
30 | /     pub struct S {
31 | |         f: (),
32 | |     }
   | |_____- `S` defined here
...
38 |               let _: Self = Self; //~ ERROR E0423
   |                             ^^^^ help: use struct literal syntax instead: `S { f: val }`

error[E0308]: mismatched types
  --> $DIR/self.rs:37:25
   |
37 |             let _: () = self; //~ ERROR E0308
   |                    --   ^^^^ expected `()`, found struct `Pin`
   |                    |
   |                    expected due to this
   |
   = note: expected unit type `()`
                 found struct `Pin<&mut self_span::S>`

error[E0308]: mismatched types
  --> $DIR/self.rs:50:25
   |
50 |             let _: () = self; //~ ERROR E0308
   |                    --   ^^^^ expected `()`, found struct `Pin`
   |                    |
   |                    expected due to this
   |
   = note: expected unit type `()`
                 found struct `Pin<&mut E>`

error[E0533]: expected unit struct, unit variant or constant, found struct variant `Self::V`
  --> $DIR/self.rs:51:27
   |
51 |             let _: Self = Self::V; //~ ERROR E0533
   |                           ^^^^^^^