aboutsummaryrefslogtreecommitdiff
path: root/tests/ui/pinned_drop/self.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/pinned_drop/self.stderr')
-rw-r--r--tests/ui/pinned_drop/self.stderr23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/pinned_drop/self.stderr b/tests/ui/pinned_drop/self.stderr
new file mode 100644
index 0000000..3ba333b
--- /dev/null
+++ b/tests/ui/pinned_drop/self.stderr
@@ -0,0 +1,23 @@
+error: `self` parameter is only allowed in associated functions
+ --> $DIR/self.rs:17:26
+ |
+17 | fn f(self: ()) {
+ | ^^^^ not semantically valid as function parameter
+...
+23 | 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 can't capture dynamic environment in a fn item
+ | ^^^^
+...
+23 | 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)