mirror of
https://git.proxmox.com/git/rustc
synced 2025-08-24 08:22:25 +00:00
17 lines
354 B
Rust
17 lines
354 B
Rust
#![crate_name = "dependency"]
|
|
#![crate_type = "rlib"]
|
|
pub struct Type;
|
|
pub trait Trait {
|
|
fn foo(&self);
|
|
fn bar();
|
|
}
|
|
pub trait Trait2 {}
|
|
impl Trait2 for Type {}
|
|
impl Trait for Type {
|
|
fn foo(&self) {}
|
|
fn bar() {}
|
|
}
|
|
pub fn do_something<X: Trait>(_: X) {}
|
|
pub fn do_something_type(_: Type) {}
|
|
pub fn do_something_trait(_: Box<dyn Trait2>) {}
|