smarter E0390
This commit is contained in:
parent
5957f208a5
commit
0c13a9c020
6 changed files with 148 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
A method was implemented on a primitive type.
|
||||
A method or constant was implemented on a primitive type.
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
|
@ -12,7 +12,8 @@ impl *mut Foo {}
|
|||
// `#[lang = "mut_ptr"]` is allowed for the `*mut T` primitive
|
||||
```
|
||||
|
||||
This isn't allowed, but using a trait to implement a method is a good solution.
|
||||
This isn't allowed, but using a trait to implement a method or constant
|
||||
is a good solution.
|
||||
Example:
|
||||
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue