Debian Codegraph @

tests/fixtures/invalid/field-leaf-and-ignore.rs

raw symbols SCIP
1 use daft::Diffable;
2
3 #[derive(Diffable)]
4 struct MyStruct {
5 // Having both `leaf` and `ignore` should result in an error.
6 #[daft(leaf, ignore)]
7 a: i32,
8 #[daft(ignore)]
9 #[daft(leaf)]
10 b: String,
11 }
12
13 fn main() {
14 // MyStruct should still exist, even though the Diffable impl couldn't be
15 // generated.
16 let _ = MyStruct { a: 0, b: "foo".to_string() };
17 }