Skip to content

Commit

Permalink
Rollup merge of rust-lang#43176 - RalfJung:explain, r=eddyb
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
GuillaumeGomez authored Aug 11, 2017
2 parents 73c3f55 + 5067ef2 commit 7a80cf1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustc_typeck/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1525,9 +1525,9 @@ static BAR: _ = "test"; // error, explicitly write out the 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{}
Expand Down

0 comments on commit 7a80cf1

Please sign in to comment.