parent
300cdc27dd
commit
a0a06232ce
@ -18,16 +18,20 @@ pub trait OtherTrait {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SomeStruct {
|
struct SomeStruct {}
|
||||||
name: String,
|
struct OtherStruct {}
|
||||||
}
|
|
||||||
|
|
||||||
impl SomeTrait for SomeStruct {}
|
impl SomeTrait for SomeStruct {}
|
||||||
impl OtherTrait for SomeStruct {}
|
impl OtherTrait for SomeStruct {}
|
||||||
|
impl SomeTrait for OtherStruct {}
|
||||||
|
impl OtherTrait for OtherStruct {}
|
||||||
|
|
||||||
// YOU MAY ONLY CHANGE THE NEXT LINE
|
// YOU MAY ONLY CHANGE THE NEXT LINE
|
||||||
fn some_func(item: ??) -> bool {
|
fn some_func(item: ??) -> bool {
|
||||||
item.some_function() && item.other_function()
|
item.some_function() && item.other_function()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {}
|
fn main() {
|
||||||
|
some_func(SomeStruct {});
|
||||||
|
some_func(OtherStruct {});
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user