• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1error: `self` parameter is only allowed in associated functions
2  --> $DIR/self.rs:17:26
3   |
417 |                     fn f(self: ()) {} //~ ERROR `self` parameter is only allowed in associated functions
5   |                          ^^^^ not semantically valid as function parameter
6...
720 |             t!();
8   |             ----- in this macro invocation
9   |
10   = note: associated functions are those in `impl` or `trait` definitions
11   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
12
13error[E0434]: can't capture dynamic environment in a fn item
14  --> $DIR/self.rs:15:29
15   |
1615 |                     let _ = self; //~ ERROR E0434
17   |                             ^^^^
18...
1920 |             t!();
20   |             ----- in this macro invocation
21   |
22   = help: use the `|| { ... }` closure form instead
23   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
24
25error[E0423]: expected value, found struct `S`
26  --> $DIR/self.rs:38:27
27   |
2830 | /     pub struct S {
2931 | |         f: (),
3032 | |     }
31   | |_____- `S` defined here
32...
3338 |               let _: Self = Self; //~ ERROR E0423
34   |                             ^^^^ help: use struct literal syntax instead: `S { f: val }`
35
36error[E0308]: mismatched types
37  --> $DIR/self.rs:37:25
38   |
3937 |             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  --> $DIR/self.rs:50:25
49   |
5050 |             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 `Self::V`
59  --> $DIR/self.rs:51:27
60   |
6151 |             let _: Self = Self::V; //~ ERROR E0533
62   |                           ^^^^^^^
63