2013-03-20 21:38:57 +00:00
|
|
|
// xfail-fast
|
|
|
|
// aux-build:xc_private_method_lib.rs
|
|
|
|
|
|
|
|
extern mod xc_private_method_lib;
|
|
|
|
|
|
|
|
fn main() {
|
2013-08-07 12:29:29 +00:00
|
|
|
// normal method on struct
|
|
|
|
let _ = xc_private_method_lib::Struct{ x: 10 }.meth_struct(); //~ ERROR method `meth_struct` is private
|
|
|
|
// static method on struct
|
2013-08-24 01:31:43 +00:00
|
|
|
let _ = xc_private_method_lib::Struct::static_meth_struct(); //~ ERROR method `static_meth_struct` is private
|
2013-08-07 12:29:29 +00:00
|
|
|
|
|
|
|
// normal method on enum
|
|
|
|
let _ = xc_private_method_lib::Variant1(20).meth_enum(); //~ ERROR method `meth_enum` is private
|
|
|
|
// static method on enum
|
2013-08-24 01:31:43 +00:00
|
|
|
let _ = xc_private_method_lib::Enum::static_meth_enum(); //~ ERROR method `static_meth_enum` is private
|
2013-03-20 21:38:57 +00:00
|
|
|
}
|