Rollup merge of #74266 - GuillaumeGomez:cleanup-e0720, r=Dylan-DPC
Clean up E0720 explanation r? @Dylan-DPC
This commit is contained in:
commit
1ed74eeef9
1 changed files with 5 additions and 3 deletions
|
@ -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]`.
|
||||
|
|
Loading…
Add table
Reference in a new issue