]> git.lizzy.rs Git - rust.git/blob - tests/ui/privacy/privacy-ufcs.rs
Rollup merge of #106244 - atouchet:readme3, r=workingjubilee
[rust.git] / tests / ui / privacy / privacy-ufcs.rs
1 // Test to ensure private traits are inaccessible with UFCS angle-bracket syntax.
2
3 mod foo {
4     trait Bar {
5         fn baz() {}
6     }
7
8     impl Bar for i32 {}
9 }
10
11 fn main() {
12     <i32 as ::foo::Bar>::baz(); //~ERROR trait `Bar` is private
13 }