about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2022-01-20 11:06:45 -0500
committerFelix S. Klock II <pnkfelix@pnkfx.org>2022-03-03 14:38:50 -0500
commite9035f7bef47c21b575af517dce309d96df4eb51 (patch)
tree80f987621f14399c7966823d918f29fd767428bd /compiler/rustc_builtin_macros/src
parent45660949132222ba7ec0905649b2affd68e0e13c (diff)
downloadrust-e9035f7bef47c21b575af517dce309d96df4eb51.tar.gz
rust-e9035f7bef47c21b575af517dce309d96df4eb51.zip
refactor: prepare to associate multiple spans with a module.
Diffstat (limited to 'compiler/rustc_builtin_macros/src')
-rw-r--r--compiler/rustc_builtin_macros/src/test_harness.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_builtin_macros/src/test_harness.rs b/compiler/rustc_builtin_macros/src/test_harness.rs
index 7ee0fb9b817..a489b23bad8 100644
--- a/compiler/rustc_builtin_macros/src/test_harness.rs
+++ b/compiler/rustc_builtin_macros/src/test_harness.rs
@@ -129,7 +129,9 @@ impl<'a> MutVisitor for TestHarnessGenerator<'a> {
 
         // We don't want to recurse into anything other than mods, since
         // mods or tests inside of functions will break things
-        if let ast::ItemKind::Mod(_, ModKind::Loaded(.., span)) = item.kind {
+        if let ast::ItemKind::Mod(_, ModKind::Loaded(.., ast::ModSpans { inner_span: span })) =
+            item.kind
+        {
             let prev_tests = mem::take(&mut self.tests);
             noop_visit_item_kind(&mut item.kind, self);
             self.add_test_cases(item.id, span, prev_tests);