]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #74266 - GuillaumeGomez:cleanup-e0720, r=Dylan-DPC
authorYuki Okushi <huyuumi.dev@gmail.com>
Wed, 29 Jul 2020 00:24:13 +0000 (09:24 +0900)
committerGitHub <noreply@github.com>
Wed, 29 Jul 2020 00:24:13 +0000 (09:24 +0900)
Clean up E0720 explanation

r? @Dylan-DPC

src/librustc_error_codes/error_codes/E0720.md

index 410aa4f4609a82778f2db9e1656853e629df08eb..40dfa484d3f9443760894bb2680994fddcfa0645 100644 (file)
@@ -1,11 +1,13 @@
 An `impl Trait` type expands to a recursive type.
 
-An `impl Trait` type must be expandable to a concrete type that contains no
-`impl Trait` types. For example the following example tries to create an
-`impl Trait` type `T` that is equal to `[T, T]`:
+Erroneous code example:
 
 ```compile_fail,E0720
 fn make_recursive_type() -> impl Sized {
     [make_recursive_type(), make_recursive_type()]
 }
 ```
+
+An `impl Trait` type must be expandable to a concrete type that contains no
+`impl Trait` types. For example the previous example tries to create an
+`impl Trait` type `T` that is equal to `[T, T]`.