Debian Codegraph @

debian/rust-vendor/defmt/tests/ui/derive_removed_bound.rs

raw
1 struct Flavor;
2
3 trait FlavorT {
4 type Str;
5 }
6
7 impl FlavorT for Flavor {
8 type Str = &'static str;
9 }
10
11 #[derive(defmt::Format)]
12 #[defmt(bound())]
13 #[defmt(bound(F: Sized))]
14 enum Flavored<F: FlavorT> {
15 Str(F::Str),
16 }
17
18 const _: () = {
19 const fn implements_format<T: defmt::Format>() {}
20
21 implements_format::<Flavored<Flavor>>();
22 };
23
24 fn main() {}