File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -684,6 +684,25 @@ for types as needed by the compiler, and it is currently disallowed to
684
684
explicitly implement it for a type.
685
685
"## ,
686
686
687
+ E0326 : r##"
688
+ The types of any associated constants in a trait implementation must match the
689
+ types in the trait definition. This error indicates that there was a mismatch.
690
+
691
+ Here's an example of this error:
692
+
693
+ ```
694
+ trait Foo {
695
+ const BAR: bool;
696
+ }
697
+
698
+ struct Bar;
699
+
700
+ impl Foo for Bar {
701
+ const BAR: u32 = 5; // error, expected bool, found u32
702
+ }
703
+ ```
704
+ "## ,
705
+
687
706
E0368 : r##"
688
707
This error indicates that a binary assignment operator like `+=` or `^=` was
689
708
applied to the wrong types.
@@ -885,7 +904,6 @@ register_diagnostics! {
885
904
E0323 , // implemented an associated const when another trait item expected
886
905
E0324 , // implemented a method when another trait item expected
887
906
E0325 , // implemented an associated type when another trait item expected
888
- E0326 , // associated const implemented with different type from trait
889
907
E0327 , // referred to method instead of constant in match pattern
890
908
E0328 , // cannot implement Unsize explicitly
891
909
E0366 , // dropck forbid specialization to concrete type or region
You can’t perform that action at this time.
0 commit comments