about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-08-11 10:20:16 +0200
committerGitHub <noreply@github.com>2017-08-11 10:20:16 +0200
commit7a80cf1ef130a0b30e98ed93b0aef60bbc729f94 (patch)
tree8e147ab2fa24fd2cf227a2c19e172bb3b871b565 /src
parent73c3f55a3e6c370527dd620d116f27accd22d934 (diff)
parent5067ef224f1dd2b14a0907e9b058b25f48a82abd (diff)
downloadrust-7a80cf1ef130a0b30e98ed93b0aef60bbc729f94.tar.gz
rust-7a80cf1ef130a0b30e98ed93b0aef60bbc729f94.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_typeck/diagnostics.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_typeck/diagnostics.rs b/src/librustc_typeck/diagnostics.rs
index 35ca19698e8..c74dc24ddc3 100644
--- a/src/librustc_typeck/diagnostics.rs
+++ b/src/librustc_typeck/diagnostics.rs
@@ -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{}