diff options
Diffstat (limited to 'third_party/rust/pin-project/tests/ui/pinned_drop/self.stderr')
-rw-r--r-- | third_party/rust/pin-project/tests/ui/pinned_drop/self.stderr | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/third_party/rust/pin-project/tests/ui/pinned_drop/self.stderr b/third_party/rust/pin-project/tests/ui/pinned_drop/self.stderr new file mode 100644 index 0000000000..a19d5a0db3 --- /dev/null +++ b/third_party/rust/pin-project/tests/ui/pinned_drop/self.stderr @@ -0,0 +1,62 @@ +error: `self` parameter is only allowed in associated functions + --> tests/ui/pinned_drop/self.rs:18:26 + | +18 | fn f(self: ()) {} //~ ERROR `self` parameter is only allowed in associated functions + | ^^^^ not semantically valid as function parameter +... +21 | t!(); + | ---- in this macro invocation + | + = note: associated functions are those in `impl` or `trait` definitions + = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0434]: can't capture dynamic environment in a fn item + --> tests/ui/pinned_drop/self.rs:16:29 + | +16 | let _ = self; //~ ERROR E0434 + | ^^^^ +... +21 | t!(); + | ---- in this macro invocation + | + = help: use the `|| { ... }` closure form instead + = note: this error originates in the macro `t` (in Nightly builds, run with -Z macro-backtrace for more info) + +error[E0423]: expected value, found struct `S` + --> tests/ui/pinned_drop/self.rs:40:27 + | +32 | / pub struct S { +33 | | f: (), +34 | | } + | |_____- `S` defined here +... +40 | let _: Self = Self; //~ ERROR E0423 + | ^^^^ help: use struct literal syntax instead: `S { f: val }` + +error[E0308]: mismatched types + --> tests/ui/pinned_drop/self.rs:39:25 + | +39 | 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 + --> tests/ui/pinned_drop/self.rs:52:25 + | +52 | 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 `E::V` + --> tests/ui/pinned_drop/self.rs:53:27 + | +53 | let _: Self = Self::V; //~ ERROR E0533 + | ^^^^^^^ |