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>2017-07-31 23:04:34 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2017-08-30 01:38:54 +0300
commit3da868dcb67e85ccbd6d64cdcc29829b1399de15 (patch)
tree379d1e6e3d7a0b3bca1a5d6f73fd4443b841b0a6 /src/libsyntax_ext/deriving/cmp
parent630e02f25be1e65b316857c5bd8022da0b96db40 (diff)
downloadrust-3da868dcb67e85ccbd6d64cdcc29829b1399de15.tar.gz
rust-3da868dcb67e85ccbd6d64cdcc29829b1399de15.zip
Make fields of `Span` private
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 0b57beeae85..a282ff5bd04 100644
--- a/src/libsyntax_ext/deriving/cmp/eq.rs
+++ b/src/libsyntax_ext/deriving/cmp/eq.rs
@@ -58,7 +58,7 @@ fn cs_total_eq_assert(cx: &mut ExtCtxt, trait_span: Span, substr: &Substructure)
                         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 { ctxt: cx.backtrace(), ..span };
+        let span = span.with_ctxt(cx.backtrace());
         let assert_path = cx.path_all(span, true,
                                         cx.std_path(&["cmp", helper_name]),
                                         vec![], vec![ty], vec![]);