Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pub mod test {
- pub struct A;
- pub struct B;
- pub struct Foo<T>(::std::marker::PhantomData<T>);
- impl Foo<A> {
- fn foo(a: usize) -> usize {
- a
- }
- }
- impl Foo<B> {
- fn foo(a: usize, b: usize) -> usize {
- b
- }
- }
- }
- fn main() {
- test::Foo::<test::B>::foo(0, 0);
- }
Add Comment
Please, Sign In to add comment