Skip to content

Commit 0a70336

Browse files
authored
Rollup merge of rust-lang#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.
2 parents 9868352 + 5067ef2 commit 0a70336

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc_typeck/diagnostics.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1525,9 +1525,9 @@ static BAR: _ = "test"; // error, explicitly write out the type instead
15251525
"##,
15261526

15271527
E0122: r##"
1528-
An attempt was made to add a generic constraint to a type alias. While Rust will
1529-
allow this with a warning, it will not currently enforce the constraint.
1530-
Consider the example below:
1528+
An attempt was made to add a generic constraint to a type alias. This constraint
1529+
is entirely ignored. For backwards compatibility, Rust still allows this with a
1530+
warning. Consider the example below:
15311531
15321532
```
15331533
trait Foo{}

0 commit comments

Comments
 (0)