Skip to content

Commit

Permalink
Rollup merge of rust-lang#31130 - marcbowes:master, r=nrc
Browse files Browse the repository at this point in the history
E0210 explains about orphan rules and suggests using a local type as a workaround. It wasn't obvious to me that I couldn't use a type alias, so I added a note.
  • Loading branch information
steveklabnik committed Jan 23, 2016
2 parents b697b3e + 97f9cad commit 7c22c1a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,8 @@ struct MyType<T>(T);
impl<T> ForeignTrait for MyType<T> { ... } // Ok
```
Please note that a type alias is not sufficient.
For another example of an error, suppose there's another trait defined in `foo`
named `ForeignTrait2` that takes two type parameters. Then this `impl` results
in the same rule violation:
Expand Down

0 comments on commit 7c22c1a

Please sign in to comment.