about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMaybe Waffle <waffle.lapkin@gmail.com>2023-07-30 15:37:39 +0000
committerMaybe Waffle <waffle.lapkin@gmail.com>2023-07-30 15:37:39 +0000
commita3838780f21b56377f1002476b17c6d91070cbfc (patch)
treeb0884a70c756b56d5948ccc129649cb84ba18474 /compiler
parent483ef5f4d8de1a8ef0d9a2771b7a4a45f9846721 (diff)
downloadrust-a3838780f21b56377f1002476b17c6d91070cbfc.tar.gz
rust-a3838780f21b56377f1002476b17c6d91070cbfc.zip
Simplify `Span::can_be_used_for_suggestions` a little tiny bit
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_span/src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index ecaa82874a3..fbd9bf05528 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -605,7 +605,7 @@ impl Span {
         // 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())))
     }