Skip to content

error[E0428]: the name _ is defined multiple times | using 2018 edition and uniform paths #53484

Closed
@sbstp

Description

@sbstp

This error comes from an example file that uses the library I'm working on. The library itself compiles fine, the example does not. Full error:

error[E0428]: the name `_` is defined multiple times
 |
 = note: `_` must be defined only once in the type namespace of this module

error: aborting due to previous error

For more information about this error, try `rustc --explain E0428`.
error: Could not compile `tinyhttp`.

The bug only occurs when I use a relative pub use.

// src/lib.rs
pub use crate::error::{HttpError, HttpResult}; // OK
pub use crate::request::parse::ResponseReader; // OK
pub use error::{HttpError, HttpResult}; // BREAKS
pub use request::parse::ResponseReader; // BREAKS

Using rustc 1.30.0-nightly (b2028828d 2018-08-16) on Debian sid amd64

The full project source can be found here. The error occurs in examples/cat.rs.

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lints

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions