Rollup merge of #43176 - RalfJung:explain, r=eddyb

E0122: clarify wording

I *assume* the reason these constraints are not hard errors is backwards compatibility. If yes, I think the error explanation (at least the long form) should be clearer about that, which is what this PR does.

If not, the explanation should give some other suitable explanation.
This commit is contained in:
Guillaume Gomez 2017-08-11 10:20:16 +02:00 committed by GitHub
commit 7a80cf1ef1

View File

@ -1525,9 +1525,9 @@ fn foo() -> _ { 5 } // error, explicitly write out the return type instead
"##,
E0122: r##"
An attempt was made to add a generic constraint to a type alias. While Rust will
allow this with a warning, it will not currently enforce the constraint.
Consider the example below:
An attempt was made to add a generic constraint to a type alias. This constraint
is entirely ignored. For backwards compatibility, Rust still allows this with a
warning. Consider the example below:
```
trait Foo{}