use zoet::zoet; // This test ensures that multiple #[zoet] attributes are handled correctly. The macro's code path // diverges somewhat here, so the test is applied separately to impl functions and free functions. #[derive(Copy, Clone)] struct Foo; #[zoet] impl Foo { #[zoet(Add)] #[zoet(Sub, Mul)] fn noop(self, _: Self) -> Self { Self } } #[derive(Copy, Clone)] struct Bar; #[zoet(Add)] #[zoet(Sub, Mul)] fn noop(_: Bar, _: Bar) -> Bar { Bar } fn main() { let x = Foo; _ = x + x; _ = x - x; _ = x * x; let x = Bar; _ = x + x; _ = x - x; _ = x * x; }