about summary refs log tree commit diff
path: root/src/test/ui/error-codes
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-10-17 20:26:21 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-10-17 20:26:21 -0700
commitf65a492afcd9cd892a1a5591f938efd41b5e0d24 (patch)
tree546101f39f5a3ea68986c042d91f86e3f8fc1eb4 /src/test/ui/error-codes
parent11011013f2b609b6cf58c96555b9e31dfd19d7ee (diff)
downloadrust-f65a492afcd9cd892a1a5591f938efd41b5e0d24.tar.gz
rust-f65a492afcd9cd892a1a5591f938efd41b5e0d24.zip
Point at enclosing function without `self` receiver
Diffstat (limited to 'src/test/ui/error-codes')
-rw-r--r--src/test/ui/error-codes/E0424.stderr14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/test/ui/error-codes/E0424.stderr b/src/test/ui/error-codes/E0424.stderr
index 99b5e01abb1..567d1b3cc75 100644
--- a/src/test/ui/error-codes/E0424.stderr
+++ b/src/test/ui/error-codes/E0424.stderr
@@ -1,14 +1,20 @@
 error[E0424]: expected value, found module `self`
   --> $DIR/E0424.rs:7:9
    |
-LL |         self.bar();
-   |         ^^^^ `self` value is a keyword only available in methods with a `self` parameter
+LL | /     fn foo() {
+LL | |         self.bar();
+   | |         ^^^^ `self` value is a keyword only available in methods with a `self` parameter
+LL | |     }
+   | |_____- this function doesn't have a `self` parameter
 
 error[E0424]: expected unit struct/variant or constant, found module `self`
   --> $DIR/E0424.rs:12:9
    |
-LL |     let self = "self";
-   |         ^^^^ `self` value is a keyword and may not be bound to variables or shadowed
+LL | / fn main () {
+LL | |     let self = "self";
+   | |         ^^^^ `self` value is a keyword and may not be bound to variables or shadowed
+LL | | }
+   | |_- this function doesn't have a `self` parameter
 
 error: aborting due to 2 previous errors