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:
commit
7a80cf1ef1
1 changed files with 3 additions and 3 deletions
|
@ -1525,9 +1525,9 @@ static BAR: _ = "test"; // error, explicitly write out the type instead
|
||||||
"##,
|
"##,
|
||||||
|
|
||||||
E0122: r##"
|
E0122: r##"
|
||||||
An attempt was made to add a generic constraint to a type alias. While Rust will
|
An attempt was made to add a generic constraint to a type alias. This constraint
|
||||||
allow this with a warning, it will not currently enforce the constraint.
|
is entirely ignored. For backwards compatibility, Rust still allows this with a
|
||||||
Consider the example below:
|
warning. Consider the example below:
|
||||||
|
|
||||||
```
|
```
|
||||||
trait Foo{}
|
trait Foo{}
|
||||||
|
|
Loading…
Reference in a new issue