Debian Codegraph @

tests/derive_cow/successes/receiver_ref.rs

raw symbols SCIP
1 extern crate blanket;
2 extern crate impls;
3
4 use std::borrow::Cow;
5
6 use blanket::blanket;
7 use impls::impls;
8
9 #[blanket(derive(Cow))]
10 pub trait Counter {
11 fn count(&self);
12 }
13
14 #[derive(Default, Clone)]
15 struct AtomicCounter {}
16
17 impl Counter for AtomicCounter {
18 fn count(&self) {}
19 }
20
21 fn main() {
22 assert!(impls!(AtomicCounter: Counter));
23 assert!(impls!(Cow<AtomicCounter>: Counter));
24 }