about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAxary <bastian_kauschke@hotmail.de>2018-11-20 14:43:16 +0100
committerAxary <bastian_kauschke@hotmail.de>2018-11-20 14:43:16 +0100
commit88d60941da317d8e9deee34d2ed5e8dbb54f928c (patch)
treec4b3fa90ef189c090a0373f24e9b12973a574732 /src
parent5bfdcc1ab1c94baa4865093b6c36fb15416e6a4d (diff)
downloadrust-88d60941da317d8e9deee34d2ed5e8dbb54f928c.tar.gz
rust-88d60941da317d8e9deee34d2ed5e8dbb54f928c.zip
improve error note
Diffstat (limited to 'src')
-rw-r--r--src/libsyntax/parse/parser.rs2
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn-start.rs2
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn-start.stderr2
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn.rs2
-rw-r--r--src/test/ui/invalid-self-argument/bare-fn.stderr2
-rw-r--r--src/test/ui/invalid-self-argument/trait-fn.rs2
-rw-r--r--src/test/ui/invalid-self-argument/trait-fn.stderr2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs
index 18929af4718..e4a4c1f5a7c 100644
--- a/src/libsyntax/parse/parser.rs
+++ b/src/libsyntax/parse/parser.rs
@@ -1828,7 +1828,7 @@ impl<'a> Parser<'a> {
             let mut err = self.struct_span_err(self.prev_span,
                 "unexpected `self` argument in function");
             err.span_label(self.prev_span,
-                "`self` is only valid as the first argument of a trait function");
+                "`self` is only valid as the first argument of an associated function");
             return Err(err);
         }
 
diff --git a/src/test/ui/invalid-self-argument/bare-fn-start.rs b/src/test/ui/invalid-self-argument/bare-fn-start.rs
index a84fe55502d..741ba5f41ce 100644
--- a/src/test/ui/invalid-self-argument/bare-fn-start.rs
+++ b/src/test/ui/invalid-self-argument/bare-fn-start.rs
@@ -1,5 +1,5 @@
 fn a(&self) { }
 //~^ ERROR unexpected `self` argument in function
-//~| NOTE `self` is only valid as the first argument of a trait function
+//~| NOTE `self` is only valid as the first argument of an associated function
 
 fn main() { }
diff --git a/src/test/ui/invalid-self-argument/bare-fn-start.stderr b/src/test/ui/invalid-self-argument/bare-fn-start.stderr
index d0eca1a9e5c..6a878b619d8 100644
--- a/src/test/ui/invalid-self-argument/bare-fn-start.stderr
+++ b/src/test/ui/invalid-self-argument/bare-fn-start.stderr
@@ -2,7 +2,7 @@ error: unexpected `self` argument in function
   --> $DIR/bare-fn-start.rs:1:7
    |
 LL | fn a(&self) { }
-   |       ^^^^ `self` is only valid as the first argument of a trait function
+   |       ^^^^ `self` is only valid as the first argument of an associated function
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/invalid-self-argument/bare-fn.rs b/src/test/ui/invalid-self-argument/bare-fn.rs
index 27e56a53713..704fa996ca6 100644
--- a/src/test/ui/invalid-self-argument/bare-fn.rs
+++ b/src/test/ui/invalid-self-argument/bare-fn.rs
@@ -1,5 +1,5 @@
 fn b(foo: u32, &mut self) { }
 //~^ ERROR unexpected `self` argument in function
-//~| NOTE `self` is only valid as the first argument of a trait function
+//~| NOTE `self` is only valid as the first argument of an associated function
 
 fn main() { }
diff --git a/src/test/ui/invalid-self-argument/bare-fn.stderr b/src/test/ui/invalid-self-argument/bare-fn.stderr
index bd6c598c88a..b13f746a4ec 100644
--- a/src/test/ui/invalid-self-argument/bare-fn.stderr
+++ b/src/test/ui/invalid-self-argument/bare-fn.stderr
@@ -2,7 +2,7 @@ error: unexpected `self` argument in function
   --> $DIR/bare-fn.rs:1:21
    |
 LL | fn b(foo: u32, &mut self) { }
-   |                     ^^^^ `self` is only valid as the first argument of a trait function
+   |                     ^^^^ `self` is only valid as the first argument of an associated function
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/invalid-self-argument/trait-fn.rs b/src/test/ui/invalid-self-argument/trait-fn.rs
index e2107e4d867..31e867bc764 100644
--- a/src/test/ui/invalid-self-argument/trait-fn.rs
+++ b/src/test/ui/invalid-self-argument/trait-fn.rs
@@ -3,7 +3,7 @@ struct Foo {}
 impl Foo {
     fn c(foo: u32, self) {}
     //~^ ERROR unexpected `self` argument in function
-    //~| NOTE `self` is only valid as the first argument of a trait function
+    //~| NOTE `self` is only valid as the first argument of an associated function
 
     fn good(&mut self, foo: u32) {}
 }
diff --git a/src/test/ui/invalid-self-argument/trait-fn.stderr b/src/test/ui/invalid-self-argument/trait-fn.stderr
index d056e53b95c..b3c2cc5b5eb 100644
--- a/src/test/ui/invalid-self-argument/trait-fn.stderr
+++ b/src/test/ui/invalid-self-argument/trait-fn.stderr
@@ -2,7 +2,7 @@ error: unexpected `self` argument in function
   --> $DIR/trait-fn.rs:4:20
    |
 LL |     fn c(foo: u32, self) {}
-   |                    ^^^^ `self` is only valid as the first argument of a trait function
+   |                    ^^^^ `self` is only valid as the first argument of an associated function
 
 error: aborting due to previous error