An impl Trait type expands to a recursive type.
Erroneous code example:
#![allow(unused)]
fn main() {
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].
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/error_codes/E0720.html