rust/tests/ui/traits/default-method/macro.rs
2023-01-11 09:32:08 +00:00

21 lines
220 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());
}