]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0720.md
Rollup merge of #93556 - dtolnay:trailingcomma, r=cjgillot
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0720.md
1 An `impl Trait` type expands to a recursive type.
2
3 Erroneous code example:
4
5 ```compile_fail,E0720
6 fn make_recursive_type() -> impl Sized {
7     [make_recursive_type(), make_recursive_type()]
8 }
9 ```
10
11 An `impl Trait` type must be expandable to a concrete type that contains no
12 `impl Trait` types. For example the previous example tries to create an
13 `impl Trait` type `T` that is equal to `[T, T]`.