File: E0424.stderr

package info (click to toggle)
rustc 1.41.1%2Bdfsg1-1~deb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 997,884 kB
  • sloc: xml: 133,832; ansic: 15,300; sh: 14,409; javascript: 6,505; python: 5,619; cpp: 3,984; makefile: 2,795; asm: 227; ruby: 68; awk: 10
file content (21 lines) | stat: -rw-r--r-- 726 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error[E0424]: expected value, found module `self`
  --> $DIR/E0424.rs:7:9
   |
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, unit variant or constant, found module `self`
  --> $DIR/E0424.rs:12:9
   |
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

For more information about this error, try `rustc --explain E0424`.