rust/src/test/ui/traits/trait-or-new-type-instead.s...

15 lines
449 B
Plaintext
Raw Normal View History

2018-08-08 14:28:26 +02:00
error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined
2018-12-25 16:56:47 +01:00
--> $DIR/trait-or-new-type-instead.rs:1:1
2018-08-08 14:28:26 +02:00
|
LL | / impl<T> Option<T> {
2019-03-09 13:03:44 +01:00
LL | |
2018-08-08 14:28:26 +02:00
LL | | pub fn foo(&self) { }
LL | | }
| |_^ impl for type defined outside of crate.
|
= note: define and implement a trait or new type instead
error: aborting due to previous error
For more information about this error, try `rustc --explain E0116`.