rust/tests/ui/xc-private-method2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
342 B
Rust
Raw Normal View History

// aux-build:xc-private-method-lib.rs
extern crate xc_private_method_lib;
fn main() {
2014-02-05 22:33:10 +00:00
let _ = xc_private_method_lib::Struct{ x: 10 }.meth_struct();
2020-03-05 03:03:15 +00:00
//~^ ERROR associated function `meth_struct` is private
let _ = xc_private_method_lib::Enum::Variant1(20).meth_enum();
2020-03-05 03:03:15 +00:00
//~^ ERROR associated function `meth_enum` is private
}