W3cubDocs

/Rust

Error code E0428

A type or module has been defined more than once.

Erroneous code example:

#![allow(unused)]
fn main() {
struct Bar;
struct Bar; // error: duplicate definition of value `Bar`
}

Please verify you didn't misspell the type/module's name or remove/rename the duplicated one. Example:

#![allow(unused)]
fn main() {
struct Bar;
struct Bar2; // ok!
}

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