• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error: `self` parameter is only allowed in associated functions
2  --> tests/ui/pinned_drop/self.rs:18:26
3   |
418 |                     fn f(self: ()) {} //~ ERROR `self` parameter is only allowed in associated functions
5   |                          ^^^^ not semantically valid as function parameter
6...
721 |             t!();
8   |             ---- in this macro invocation
9   |
10   = note: associated functions are those in `impl` or `trait` definitions
11   = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
12
13error[E0434]: can't capture dynamic environment in a fn item
14  --> tests/ui/pinned_drop/self.rs:16:29
15   |
1616 |                     let _ = self; //~ ERROR E0434
17   |                             ^^^^
18...
1921 |             t!();
20   |             ---- in this macro invocation
21   |
22   = help: use the `|| { ... }` closure form instead
23   = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info)
24
25error[E0423]: expected value, found struct `S`
26  --> tests/ui/pinned_drop/self.rs:40:27
27   |
2832 | /     pub struct S {
2933 | |         f: (),
3034 | |     }
31   | |_____- `S` defined here
32...
3340 |               let _: Self = Self; //~ ERROR E0423
34   |                             ^^^^ help: use struct literal syntax instead: `S { f: val }`
35
36error[E0308]: mismatched types
37  --> tests/ui/pinned_drop/self.rs:39:25
38   |
3939 |             let _: () = self; //~ ERROR E0308
40   |                    --   ^^^^ expected `()`, found struct `Pin`
41   |                    |
42   |                    expected due to this
43   |
44   = note: expected unit type `()`
45                 found struct `Pin<&mut self_span::S>`
46
47error[E0308]: mismatched types
48  --> tests/ui/pinned_drop/self.rs:52:25
49   |
5052 |             let _: () = self; //~ ERROR E0308
51   |                    --   ^^^^ expected `()`, found struct `Pin`
52   |                    |
53   |                    expected due to this
54   |
55   = note: expected unit type `()`
56                 found struct `Pin<&mut E>`
57
58error[E0533]: expected unit struct, unit variant or constant, found struct variant `E::V`
59  --> tests/ui/pinned_drop/self.rs:53:27
60   |
6153 |             let _: Self = Self::V; //~ ERROR E0533
62   |                           ^^^^^^^
63