mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-16 02:24:35 +00:00
18 lines
264 B
Rust
18 lines
264 B
Rust
pub mod test {
|
|
pub struct A;
|
|
pub struct B;
|
|
pub struct Foo<T>(T);
|
|
|
|
impl Foo<A> {
|
|
fn foo() {}
|
|
}
|
|
|
|
impl Foo<B> {
|
|
fn foo() {}
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
test::Foo::<test::B>::foo(); //~ ERROR associated function `foo` is private
|
|
}
|