Files
rust/tests/run-make/crate-loading/dependency-1.rs
Martin Nordholts 2dc1354cd0 tests/run-make/crate-loading: Rename source files for clarity
To make the code easier to understand.
2025-09-22 18:18:36 +02:00

16 lines
339 B
Rust

#![crate_name = "dependency"]
#![crate_type = "rlib"]
pub struct Type(pub i32);
pub trait Trait {
fn foo(&self);
fn bar();
}
pub trait Trait2 {}
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>) {}