File tree Expand file tree Collapse file tree 2 files changed +44
-2
lines changed
branches/stable/src/librustc_resolve Expand file tree Collapse file tree 2 files changed +44
-2
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32
- refs/heads/stable: d6b9e0bed95fb747d40c81f53f8c5015f2df97be
32
+ refs/heads/stable: 8a75dcdadfe8c3657c5a6f085a984e1c97b48910
33
33
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
34
34
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
35
35
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e
Original file line number Diff line number Diff line change @@ -424,6 +424,49 @@ match 0 {
424
424
```
425
425
"## ,
426
426
427
+ E0424 : r##"
428
+ `self` keyword was used in a static method. Example of erroneous code:
429
+
430
+ ```
431
+ struct Foo;
432
+
433
+ impl Foo {
434
+ fn bar(self) {}
435
+
436
+ fn foo() {
437
+ self.bar(); // error: `self` is not available in a static method.
438
+ }
439
+ }
440
+ ```
441
+
442
+ Please verify you didn't forget to add `self` in your method's argument
443
+ list if your intention wasn't to create a static method. Example:
444
+
445
+ ```
446
+ struct Foo;
447
+
448
+ impl Foo {
449
+ fn bar(self) {}
450
+
451
+ fn foo(self) {
452
+ self.bar(); // ok!
453
+ }
454
+ }
455
+ ```
456
+
457
+ Or please verify you didn't misspell the variable's name:
458
+
459
+ ```
460
+ struct Foo;
461
+
462
+ impl Foo {
463
+ fn foo(sel: i32) {
464
+ println!("{}", sel); // ok!
465
+ }
466
+ }
467
+ ```
468
+ "## ,
469
+
427
470
E0428 : r##"
428
471
A type or module has been defined more than once. Example of erroneous
429
472
code:
@@ -482,7 +525,6 @@ register_diagnostics! {
482
525
E0422 , // does not name a structure
483
526
E0423 , // is a struct variant name, but this expression uses it like a
484
527
// function name
485
- E0424 , // `self` is not available in a static method.
486
528
E0425 , // unresolved name
487
529
E0426 , // use of undeclared label
488
530
E0427 , // cannot use `ref` binding mode with ...
You can’t perform that action at this time.
0 commit comments