mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
16 lines
198 B
Rust
16 lines
198 B
Rust
pub trait Foo {
|
|
#[inline(always)]
|
|
fn f(&self);
|
|
}
|
|
|
|
pub struct Bar {
|
|
pub x: String
|
|
}
|
|
|
|
impl Foo for Bar {
|
|
#[inline(always)]
|
|
fn f(&self) {
|
|
println!("{}", (*self).x);
|
|
}
|
|
}
|