1 A method or constant was implemented on a primitive type.
3 Erroneous code example:
11 // error: cannot define inherent `impl` for primitive types
14 This isn't allowed, but using a trait to implement a method or constant
27 impl Bar for *mut Foo {
32 Instead of defining an inherent implementation on a reference, you could also
33 move the reference inside the implementation:
38 impl &Foo { // error: no nominal type found for inherent implementation
39 fn bar(self, other: Self) {}
49 fn bar(&self, other: &Self) {}