Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub mod a {
- pub trait Tr {
- fn f(&self);
- }
- }
- pub mod test1 {
- use super::a::Tr;
- pub struct S;
- impl Tr for S {
- fn f(&self) {
- println!("ok 1");
- }
- }
- }
- pub mod test2 {
- pub struct S;
- impl super::a::Tr for S {
- fn f(&self) {
- println!("ok 2");
- }
- }
- }
- fn main() {
- use a::Tr;
- test1::S.f();
- test2::S.f();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement