You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if i == (items.len() - 3/* Weird magic number (HIR-translation behaviour) */);
56
57
if cx.sess().source_map().lookup_char_pos(item.span.lo()).file.name_hash
57
-
== test_mod_hash.unwrap();// Will never fail
58
-
if !matches!(item.kind,ItemKind::Mod(_) | ItemKind::Macro(_, _));
58
+
== cx.sess().source_map().lookup_char_pos(test_mod_span.unwrap().lo()).file.name_hash;// Will never fail
59
+
if !matches!(item.kind,ItemKind::Mod(_));
59
60
if !is_in_cfg_test(cx.tcx, itid.hir_id());// The item isn't in the testing module itself
60
-
61
61
if !in_external_macro(cx.sess(), item.span);
62
+
62
63
then {
63
-
span_lint_and_help(cx,ITEMS_AFTER_TEST_MODULE, item.span,"an item was found after the testing module",None,"move the item to before the testing module was defined");
64
+
span_lint_and_help(cx,ITEMS_AFTER_TEST_MODULE,test_mod_span.unwrap().with_hi(item.span.hi()),"items were found after the testing module",None,"move the items to before the testing module was defined");
64
65
}};
65
66
66
67
ifmatches!(item.kind,ItemKind::Mod(_)){
67
68
for attr in cx.tcx.get_attrs(item.owner_id.to_def_id(), sym::cfg){
0 commit comments