1 #![feature(decl_macro, associated_type_defaults)]
2 #![allow(unused, private_in_public)]
13 let value = Pub::method;
14 //~^ ERROR type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
16 //~^ ERROR type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
18 //~^ ERROR type `for<'a> fn(&'a priv_nominal::Pub) {priv_nominal::Pub::method}` is private
20 //~^ ERROR associated constant `CONST` is private
21 // let _: Pub::AssocTy;
22 // pub type InSignatureTy = Pub::AssocTy;
33 pub fn method(&self, arg: Priv) {}
37 let value = Pub::method;
38 //~^ ERROR type `priv_signature::Priv` is private
40 //~^ ERROR type `priv_signature::Priv` is private
42 //~^ ERROR type `priv_signature::Priv` is private
46 priv_signature::mac!();
53 pub fn method<T>(&self) {}
57 let value = Pub::method::<Priv>;
58 //~^ ERROR type `priv_substs::Priv` is private
60 //~^ ERROR type `priv_substs::Priv` is private
62 //~^ ERROR type `priv_substs::Priv` is private
69 mod priv_parent_substs {
71 pub struct Pub<T = Priv>(T);
73 pub fn method(&self) {}
74 pub fn static_method() {}
75 pub const CONST: u8 = 0;
76 // pub type AssocTy = u8;
80 let value = <Pub>::method;
81 //~^ ERROR type `priv_parent_substs::Priv` is private
83 //~^ ERROR type `priv_parent_substs::Priv` is private
84 let value = Pub::method;
85 //~^ ERROR type `priv_parent_substs::Priv` is private
87 //~^ ERROR type `priv_parent_substs::Priv` is private
88 let value = <Pub>::static_method;
89 //~^ ERROR type `priv_parent_substs::Priv` is private
91 //~^ ERROR type `priv_parent_substs::Priv` is private
92 let value = Pub::static_method;
93 //~^ ERROR type `priv_parent_substs::Priv` is private
95 //~^ ERROR type `priv_parent_substs::Priv` is private
97 //~^ ERROR type `priv_parent_substs::Priv` is private
100 //~^ ERROR type `priv_parent_substs::Priv` is private
102 //~^ ERROR type `priv_parent_substs::Priv` is private
104 // let _: Pub::AssocTy;
105 // pub type InSignatureTy = Pub::AssocTy;
108 fn priv_parent_substs() {
109 priv_parent_substs::mac!();