Suppress suggestions in derive macro
This commit is contained in:
parent
8c0b4f67c9
commit
87ea0d76fe
@ -2698,6 +2698,11 @@ pub(crate) fn suggest_cast(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if expr.span.in_derive_expansion() {
|
||||||
|
// Ignore if span is from derive macro.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
let Ok(src) = self.tcx.sess.source_map().span_to_snippet(expr.span) else {
|
let Ok(src) = self.tcx.sess.source_map().span_to_snippet(expr.span) else {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user