Simplify Span::can_be_used_for_suggestions
a little tiny bit
This commit is contained in:
parent
483ef5f4d8
commit
a3838780f2
@ -605,7 +605,7 @@ impl Span {
|
|||||||
// FIXME: If this span comes from a `derive` macro but it points at code the user wrote,
|
// FIXME: If this span comes from a `derive` macro but it points at code the user wrote,
|
||||||
// the callsite span and the span will be pointing at different places. It also means that
|
// the callsite span and the span will be pointing at different places. It also means that
|
||||||
// we can safely provide suggestions on this span.
|
// we can safely provide suggestions on this span.
|
||||||
|| (matches!(self.ctxt().outer_expn_data().kind, ExpnKind::Macro(MacroKind::Derive, _))
|
|| (self.in_derive_expansion()
|
||||||
&& self.parent_callsite().map(|p| (p.lo(), p.hi())) != Some((self.lo(), self.hi())))
|
&& self.parent_callsite().map(|p| (p.lo(), p.hi())) != Some((self.lo(), self.hi())))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user