]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/traits-default-method-macro.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / traits / traits-default-method-macro.rs
CommitLineData
b7449926 1// run-pass
223e47cc 2
c34b1796 3
223e47cc 4trait Foo {
1a4d82fc
JJ
5 fn bar(&self) -> String {
6 format!("test")
223e47cc
LB
7 }
8}
9
10enum Baz {
11 Quux
12}
13
14impl Foo for Baz {
15}
16
17pub fn main() {
1a4d82fc
JJ
18 let q = Baz::Quux;
19 assert_eq!(q.bar(), "test".to_string());
223e47cc 20}