about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-06 15:37:49 +0100
committerGitHub <noreply@github.com>2020-02-06 15:37:49 +0100
commit2210d3f356ab3b6b7a658858cea681dcd4399073 (patch)
tree599270ecceecd49f5bd2a4ff9f028ba2251cbc9f
parentec248333259481af2eedc1cc2a8bdec3b6435a31 (diff)
parentc182461a20d1e81d9132d8ab1dd18db91908f3b8 (diff)
downloadrust-2210d3f356ab3b6b7a658858cea681dcd4399073.tar.gz
rust-2210d3f356ab3b6b7a658858cea681dcd4399073.zip
Rollup merge of #68869 - GuillaumeGomez:err-explanation-e0271, r=Dylan-DPC
clean up E0271 explanation

r? @Dylan-DPC
-rw-r--r--src/librustc_error_codes/error_codes/E0271.md12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/librustc_error_codes/error_codes/E0271.md b/src/librustc_error_codes/error_codes/E0271.md
index 4078598b394..31334069ed8 100644
--- a/src/librustc_error_codes/error_codes/E0271.md
+++ b/src/librustc_error_codes/error_codes/E0271.md
@@ -1,9 +1,6 @@
-This is because of a type mismatch between the associated type of some
-trait (e.g., `T::Bar`, where `T` implements `trait Quux { type Bar; }`)
-and another type `U` that is required to be equal to `T::Bar`, but is not.
-Examples follow.
+A type mismatched an associated type of a trait.
 
-Here is a basic example:
+Erroneous code example:
 
 ```compile_fail,E0271
 trait Trait { type AssociatedType; }
@@ -17,6 +14,11 @@ impl Trait for i8 { type AssociatedType = &'static str; }
 foo(3_i8);
 ```
 
+This is because of a type mismatch between the associated type of some
+trait (e.g., `T::Bar`, where `T` implements `trait Quux { type Bar; }`)
+and another type `U` that is required to be equal to `T::Bar`, but is not.
+Examples follow.
+
 Here is that same example again, with some explanatory comments:
 
 ```compile_fail,E0271