W3cubDocs

/Rust

Error code E0224

A trait object was declared with no traits.

Erroneous code example:

#![allow(unused)]
fn main() {
type Foo = dyn 'static +;
}

Rust does not currently support this.

To solve, ensure that the trait object has at least one trait:

#![allow(unused)]
fn main() {
type Foo = dyn 'static + Copy;
}

© 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/E0224.html