mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
18 lines
216 B
Rust
18 lines
216 B
Rust
#![crate_type = "rlib"]
|
|
struct Foo;
|
|
|
|
trait Tr {
|
|
fn tr(&self);
|
|
}
|
|
|
|
impl Tr for Foo {
|
|
fn tr(&self) {}
|
|
}
|
|
|
|
fn take_method<T>(f: fn(&T), t: &T) {}
|
|
|
|
#[inline]
|
|
pub fn pass_method() {
|
|
take_method(Tr::tr, &Foo);
|
|
}
|