2015-09-22 09:06:43 +01:00
|
|
|
// Test to ensure private traits are inaccessible with UFCS angle-bracket syntax.
|
|
|
|
|
|
|
|
|
|
mod foo {
|
|
|
|
|
trait Bar {
|
|
|
|
|
fn baz() {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
impl Bar for i32 {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2016-02-22 22:33:38 +00:00
|
|
|
<i32 as ::foo::Bar>::baz(); //~ERROR trait `Bar` is private
|
2015-09-22 09:06:43 +01:00
|
|
|
}
|