Rollup merge of #114258 - WaffleLapkin:reuse_in_derive_expansion, r=petrochenkov
Simplify `Span::can_be_used_for_suggestions` a little tiny bit Just something I saw randomly.
This commit is contained in:
commit
4916ab5330
@ -605,7 +605,7 @@ pub fn can_be_used_for_suggestions(self) -> bool {
|
||||
// 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
|
||||
// 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())))
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user