File tree 1 file changed +23
-2
lines changed 1 file changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -425,6 +425,29 @@ match 0 {
425
425
```
426
426
"## ,
427
427
428
+ E0424 : r##"
429
+ A `struct` variant name was used like a function name. Example of
430
+ erroneous code:
431
+
432
+ ```
433
+ struct Foo { a: bool};
434
+
435
+ println!("I am {}", Foo);
436
+ // error: `Foo` is a struct variant name, but this expression uses
437
+ // it like a function name
438
+ ```
439
+
440
+ Please verify you didn't misspell the name of what you actually wanted
441
+ to use here. Example:
442
+
443
+ ```
444
+ struct Foo { a: bool};
445
+
446
+ let foo = Foo { a: true };
447
+ println!("I am {}", foo); // ok!
448
+ ```
449
+ "## ,
450
+
428
451
E0424 : r##"
429
452
The `self` keyword was used in a static method. Example of erroneous code:
430
453
@@ -660,8 +683,6 @@ register_diagnostics! {
660
683
E0420 , // is not an associated const
661
684
E0421 , // unresolved associated const
662
685
E0422 , // does not name a structure
663
- E0423 , // is a struct variant name, but this expression uses it like a
664
- // function name
665
686
E0427 , // cannot use `ref` binding mode with ...
666
687
E0429 , // `self` imports are only allowed within a { } list
667
688
E0434 , // can't capture dynamic environment in a fn item
You can’t perform that action at this time.
0 commit comments