// Copyright 2013 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // // Licensed under the Apache License, Version 2.0 or the MIT license // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. pub struct A; pub struct B; pub mod test { pub struct A; } impl A { pub fn foo(&self) -> int { static a: int = 1; return a } pub fn bar(&self) -> int { static a: int = 2; return a; } } impl B { pub fn foo(&self) -> int { static a: int = 3; return a } pub fn bar(&self) -> int { static a: int = 4; return a; } } impl test::A { pub fn foo(&self) -> int { static a: int = 5; return a } pub fn bar(&self) -> int { static a: int = 6; return a; } } pub fn foo() -> int { let a = A::<()>; let b = B::<()>; let c = test::A::<()>; return a.foo() + a.bar() + b.foo() + b.bar() + c.foo() + c.bar(); }