Skip to content

Commit

Permalink
Rollup merge of #74266 - GuillaumeGomez:cleanup-e0720, r=Dylan-DPC
Browse files Browse the repository at this point in the history
Clean up E0720 explanation

r? @Dylan-DPC
  • Loading branch information
JohnTitor authored Jul 29, 2020
2 parents a7eff79 + 633d1a5 commit 1ed74ee
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/librustc_error_codes/error_codes/E0720.md
Original file line number Diff line number Diff line change
@@ -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]`.

0 comments on commit 1ed74ee

Please sign in to comment.