advise_incompatibility

Function advise_incompatibility 

Source
pub fn advise_incompatibility(err_needing_advice: Error) -> Error
Expand description

Add a warning about derive-deftly version incompatibility

ยงLost advice hazard

Take care! syn generates errors from unprocessed tokens in syn::parse2 etc. Calling this function within syn::parse2 (ie, somewhere you have a ParseStream, will result in those errors not receiving advice.

Ideally, call this from functions that have a TokenStream. If you do that, then functions isnide that can use this method, avoiding the problem: any errors stored up by syn will emerge at that call site, and be properly dealt with.