mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-09 16:37:36 +00:00
17 lines
169 B
Rust
17 lines
169 B
Rust
![]() |
trait Foo {
|
||
|
fn bar() -> ~str {
|
||
|
fmt!("test")
|
||
|
}
|
||
|
}
|
||
|
|
||
|
enum Baz {
|
||
|
Quux
|
||
|
}
|
||
|
|
||
|
impl Baz: Foo {
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
let q = Quux;
|
||
|
assert q.bar() == ~"test";
|
||
|
}
|