1 error[E0116]: cannot define inherent `impl` for a type outside of the crate where the type is defined
2 --> $DIR/trait-or-new-type-instead.rs:1:1
4 LL | / impl<T> Option<T> {
6 LL | | pub fn foo(&self) { }
8 | |_^ impl for type defined outside of crate.
10 = note: define and implement a trait or new type instead
12 error: aborting due to previous error
14 For more information about this error, try `rustc --explain E0116`.