]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/trait-or-new-type-instead.stderr
Rollup merge of #106648 - Nilstrieb:poly-cleanup, r=compiler-errors
[rust.git] / tests / ui / traits / trait-or-new-type-instead.stderr
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
3    |
4 LL | / impl<T> Option<T> {
5 LL | |
6 LL | |     pub fn foo(&self) { }
7 LL | | }
8    | |_^ impl for type defined outside of crate.
9    |
10    = note: define and implement a trait or new type instead
11
12 error: aborting due to previous error
13
14 For more information about this error, try `rustc --explain E0116`.