429 | body.drive(&mut graph);
| ^^^^^ method cannot be called on `Option<&Body>` due to unsatisfied trait bounds
--> /rustc/65ea825f4021eaf77f1b25139969712d65b435a4/library/core/src/option.rs:563:1
|
= note: doesn't satisfy `std::option::Option<&gast::Body>: Drive`
|
= note: the following trait bounds were not satisfied:
`&'a &gast::Body: derive_visitor::DerefAndDrive`
which is required by `std::option::Option<&gast::Body>: Drive`
Here's my question: why not implement &T: Drive for all T: Drive and remove DerefAndDrive? Is there a specific reason for this approach?
I was trying something like:
However this does not work because:
Here's my question: why not implement
&T: Drive
for allT: Drive
and removeDerefAndDrive
? Is there a specific reason for this approach?