fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
993 B29 linesraw
1error[E0424]: expected value, found module `self`
2  --> $DIR/suggest-add-self.rs:5:9
3   |
4LL |     pub(crate) fn f() {
5   |                   - this function doesn't have a `self` parameter
6LL |         self.0
7   |         ^^^^ `self` value is a keyword only available in methods with a `self` parameter
8   |
9help: add a `self` receiver parameter to make the associated `fn` a method
10   |
11LL |     pub(crate) fn f(&self) {
12   |                     +++++
13
14error[E0424]: expected value, found module `self`
15  --> $DIR/suggest-add-self.rs:10:9
16   |
17LL |     pub fn g() {
18   |            - this function doesn't have a `self` parameter
19LL |         self.0
20   |         ^^^^ `self` value is a keyword only available in methods with a `self` parameter
21   |
22help: add a `self` receiver parameter to make the associated `fn` a method
23   |
24LL |     pub fn g(&self) {
25   |              +++++
26
27error: aborting due to 2 previous errors
28
29For more information about this error, try `rustc --explain E0424`.