mirror of
https://git.proxmox.com/git/rustc
synced 2026-03-28 22:11:31 +00:00
21 lines
221 B
Rust
21 lines
221 B
Rust
//@ run-pass
|
|
|
|
|
|
trait Foo {
|
|
fn bar(&self) -> String {
|
|
format!("test")
|
|
}
|
|
}
|
|
|
|
enum Baz {
|
|
Quux
|
|
}
|
|
|
|
impl Foo for Baz {
|
|
}
|
|
|
|
pub fn main() {
|
|
let q = Baz::Quux;
|
|
assert_eq!(q.bar(), "test".to_string());
|
|
}
|