smarter E0390

This commit is contained in:
Ethan Brierley 2020-12-06 20:30:07 +00:00
parent 5957f208a5
commit 0c13a9c020
6 changed files with 148 additions and 7 deletions

View file

@ -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:
```