rust/tests/ui/imports/auxiliary/overlapping_pub_trait_source.rs
2023-01-11 09:32:08 +00:00

14 lines
285 B
Rust

/* This crate declares an item as both `prelude::*` and `m::Tr`.
* The compiler should always suggest `m::Tr`. */
pub struct S;
pub mod prelude {
pub use crate::m::Tr as _;
}
pub mod m {
pub trait Tr { fn method(&self); }
impl Tr for crate::S { fn method(&self) {} }
}