We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Span::can_be_used_for_suggestions
1 parent 483ef5f commit a383878Copy full SHA for a383878
compiler/rustc_span/src/lib.rs
@@ -605,7 +605,7 @@ impl Span {
605
// FIXME: If this span comes from a `derive` macro but it points at code the user wrote,
606
// the callsite span and the span will be pointing at different places. It also means that
607
// we can safely provide suggestions on this span.
608
- || (matches!(self.ctxt().outer_expn_data().kind, ExpnKind::Macro(MacroKind::Derive, _))
+ || (self.in_derive_expansion()
609
&& self.parent_callsite().map(|p| (p.lo(), p.hi())) != Some((self.lo(), self.hi())))
610
}
611
0 commit comments