about summary refs log tree commit diff
path: root/src/libsyntax_ext/deriving/cmp
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-08-21 21:28:22 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-08-23 01:44:33 +0300
commit0fb01d219c7b7de142ad4097dd1e5cf708e7a27f (patch)
treeb800e81720ceccc8ad2ea2722288cea4d6ec3a72 /src/libsyntax_ext/deriving/cmp
parent760226733e940cb375f791e894fbb554555eeb01 (diff)
Audit uses of `apply_mark` in built-in macros
Replace them with equivalents of `Span::{def_site,call_site}` from proc macro API.
The new API is much less error prone and doesn't rely on macros having default transparency.
Diffstat (limited to 'src/libsyntax_ext/deriving/cmp')
-rw-r--r--src/libsyntax_ext/deriving/cmp/eq.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsyntax_ext/deriving/cmp/eq.rs b/src/libsyntax_ext/deriving/cmp/eq.rs
index 54027c600b4..32ab47969ad 100644
--- a/src/libsyntax_ext/deriving/cmp/eq.rs
+++ b/src/libsyntax_ext/deriving/cmp/eq.rs
@@ -53,7 +53,7 @@ fn cs_total_eq_assert(cx: &mut ExtCtxt<'_>,
                         ty: P<ast::Ty>, span: Span, helper_name: &str) {
         // Generate statement `let _: helper_name<ty>;`,
         // set the expn ID so we can use the unstable struct.
-        let span = span.with_ctxt(cx.backtrace());
+        let span = cx.with_def_site_ctxt(span);
         let assert_path = cx.path_all(span, true,
                                         cx.std_path(&[sym::cmp, Symbol::intern(helper_name)]),
                                         vec![GenericArg::Type(ty)], vec![]);