1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 #![feature(decl_macro)]
14 static PRIV_STATIC
: u8 = 0;
15 enum PrivEnum { Variant }
16 pub enum PubEnum { Variant }
17 trait PrivTrait { fn method() {}
}
18 impl PrivTrait
for u8 {}
19 pub trait PubTrait { fn method() {}
}
20 impl PubTrait
for u8 {}
21 struct PrivTupleStruct(u8);
22 pub struct PubTupleStruct(u8);
23 impl PubTupleStruct { fn method() {}
}
26 pub type Alias
= Priv
;
27 pub struct Pub
<T
= Alias
>(pub T
);
30 pub fn static_method() {}
33 fn priv_method(&self) {}
41 <u8 as PrivTrait
>::method
;
42 <u8 as PubTrait
>::method
;
45 Pub(0u8).priv_method();