]> git.lizzy.rs Git - rust.git/blob - tests/ui/suggestions/suggest-add-self.stderr
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / suggestions / suggest-add-self.stderr
1 error[E0424]: expected value, found module `self`
2   --> $DIR/suggest-add-self.rs:5:9
3    |
4 LL |     pub(crate) fn f() {
5    |                   - this function doesn't have a `self` parameter
6 LL |         self.0
7    |         ^^^^ `self` value is a keyword only available in methods with a `self` parameter
8    |
9 help: add a `self` receiver parameter to make the associated `fn` a method
10    |
11 LL |     pub(crate) fn f(&self) {
12    |                     +++++
13
14 error[E0424]: expected value, found module `self`
15   --> $DIR/suggest-add-self.rs:10:9
16    |
17 LL |     pub fn g() {
18    |            - this function doesn't have a `self` parameter
19 LL |         self.0
20    |         ^^^^ `self` value is a keyword only available in methods with a `self` parameter
21    |
22 help: add a `self` receiver parameter to make the associated `fn` a method
23    |
24 LL |     pub fn g(&self) {
25    |              +++++
26
27 error: aborting due to 2 previous errors
28
29 For more information about this error, try `rustc --explain E0424`.