Suppress suggestions in derive macro
This commit is contained in:
parent
8c0b4f67c9
commit
87ea0d76fe
1 changed files with 5 additions and 0 deletions
|
@ -2698,6 +2698,11 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
|
|||
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 {
|
||||
return false;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue