mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-19 07:16:31 +00:00
22 lines
308 B
Rust
22 lines
308 B
Rust
trait PrivTrait {
|
|
fn priv_fn(&self);
|
|
}
|
|
|
|
pub struct ImplPrivTrait;
|
|
|
|
impl PrivTrait for ImplPrivTrait {
|
|
fn priv_fn(&self) {}
|
|
}
|
|
|
|
pub struct Wrapper<T>(T);
|
|
|
|
pub trait PubTrait {
|
|
fn pub_fn(&self);
|
|
}
|
|
|
|
impl<T: PrivTrait> PubTrait for Wrapper<T> {
|
|
fn pub_fn(&self) {
|
|
self.0.priv_fn()
|
|
}
|
|
}
|