Skip to content

Trait Coherence compile error with Mira #7187

Open
@tritao

Description

@tritao
error: Trait is already implemented for type
  --> /home/joao/.forc/git/checkouts/standards-a75010d5ab7a85a4/1b00ccc05af5886ae3abd07a9a0ce6122738fc48/standards/src/src5.sw:45:1
   |
43 |   
44 |   
45 | / impl PartialEq for State {
46 | |     fn eq(self, other: Self) -> bool {
...  |
55 | |     }
56 | | }
   | |_^ Trait "eq" is already implemented for type "State".
   |
  ::: /home/joao/.forc/git/checkouts/standards-a75010d5ab7a85a4/7d35df95e0b96dc8ad188ab169fbbeeac896aae8/standards/src/src5.sw:45:1
   |
43 |   
44 |   
45 | / impl PartialEq for State {
46 | |     fn eq(self, other: Self) -> bool {
...  |
55 | |     }
56 | | }
   | |_- info: This is the already existing implementation of "eq" for "State".
   |
   = help: In Sway, there can be at most one implementation of a trait for any given type.
   = help: This property is called "trait coherence".
____

error: Trait is already implemented for type
  --> /home/joao/.forc/git/checkouts/standards-a75010d5ab7a85a4/1b00ccc05af5886ae3abd07a9a0ce6122738fc48/standards/src/src5.sw:45:1
   |
43 |   
44 |   
45 | / impl PartialEq for State {
46 | |     fn eq(self, other: Self) -> bool {
...  |
55 | |     }
56 | | }
   | |_^ Trait "neq" is already implemented for type "State".
   |
  ::: /home/joao/.forc/git/checkouts/standards-a75010d5ab7a85a4/7d35df95e0b96dc8ad188ab169fbbeeac896aae8/standards/src/src5.sw:45:1
   |
43 |   
44 |   
45 | / impl PartialEq for State {
46 | |     fn eq(self, other: Self) -> bool {
...  |
55 | |     }
56 | | }
   | |_- info: This is the already existing implementation of "neq" for "State".
   |
   = help: In Sway, there can be at most one implementation of a trait for any given type.
   = help: This property is called "trait coherence".
____

error: Trait is already implemented for type
  --> /home/joao/.forc/git/checkouts/standards-a75010d5ab7a85a4/7d35df95e0b96dc8ad188ab169fbbeeac896aae8/standards/src/src5.sw:45:1
   |
43 |   
44 |   
45 | / impl PartialEq for State {
46 | |     fn eq(self, other: Self) -> bool {
...  |
55 | |     }
56 | | }
   | |_^ Trait "eq" is already implemented for type "State".
   |
  ::: /home/joao/.forc/git/checkouts/standards-a75010d5ab7a85a4/1b00ccc05af5886ae3abd07a9a0ce6122738fc48/standards/src/src5.sw:45:1
   |
43 |   
44 |   
45 | / impl PartialEq for State {
46 | |     fn eq(self, other: Self) -> bool {
...  |
55 | |     }
56 | | }
   | |_- info: This is the already existing implementation of "eq" for "State".
   |
   = help: In Sway, there can be at most one implementation of a trait for any given type.
   = help: This property is called "trait coherence".
____

error: Trait is already implemented for type
  --> /home/joao/.forc/git/checkouts/standards-a75010d5ab7a85a4/7d35df95e0b96dc8ad188ab169fbbeeac896aae8/standards/src/src5.sw:45:1
   |
43 |   
44 |   
45 | / impl PartialEq for State {
46 | |     fn eq(self, other: Self) -> bool {
...  |
55 | |     }
56 | | }
   | |_^ Trait "neq" is already implemented for type "State".
   |
  ::: /home/joao/.forc/git/checkouts/standards-a75010d5ab7a85a4/1b00ccc05af5886ae3abd07a9a0ce6122738fc48/standards/src/src5.sw:45:1
   |
43 |   
44 |   
45 | / impl PartialEq for State {
46 | |     fn eq(self, other: Self) -> bool {
...  |
55 | |     }
56 | | }
   | |_- info: This is the already existing implementation of "neq" for "State".
   |
   = help: In Sway, there can be at most one implementation of a trait for any given type.
   = help: This property is called "trait coherence".

FYI @Dentosal

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions