mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
29 lines
669 B
Rust
29 lines
669 B
Rust
trait PrivateTrait {
|
|
fn private_trait_method(&self);
|
|
fn private_trait_method_ufcs(&self);
|
|
}
|
|
|
|
struct PrivateStruct;
|
|
|
|
impl PrivateStruct {
|
|
fn private_inherent_method(&self) { }
|
|
fn private_inherent_method_ufcs(&self) { }
|
|
}
|
|
|
|
impl PrivateTrait for PrivateStruct {
|
|
fn private_trait_method(&self) { }
|
|
fn private_trait_method_ufcs(&self) { }
|
|
}
|
|
|
|
#[inline]
|
|
pub fn public_inlinable_function() {
|
|
PrivateStruct.private_trait_method();
|
|
PrivateStruct.private_inherent_method();
|
|
}
|
|
|
|
#[inline]
|
|
pub fn public_inlinable_function_ufcs() {
|
|
PrivateStruct::private_trait_method(&PrivateStruct);
|
|
PrivateStruct::private_inherent_method(&PrivateStruct);
|
|
}
|