rust/tests/ui/imports/auxiliary/unnamed_pub_trait_source.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
266 B
Rust
Raw Normal View History

2021-11-30 19:53:39 -06:00
/* This crate declares an item that is unnamed.
* Its only public path is through `prelude::*`. */
pub struct S;
mod m {
pub trait Tr { fn method(&self); }
impl Tr for crate::S { fn method(&self) {} }
}
pub mod prelude {
pub use crate::m::Tr as _;
}