Re-exportsยง
use std::mem;๐use std::sync::atomic::Ordering;๐use rustc_ast as ast;๐use rustc_ast::attr::contains_name;๐use rustc_ast::entry::EntryPointType;๐use rustc_ast::visit::Visitor;๐use rustc_ast::GeneratedAttr;๐use rustc_ast::ModKind;๐use rustc_ast::attr;๐use rustc_attr_ir::AttributeKind;๐use rustc_attr_parsing::AttributeParser;๐use rustc_expand::base::ExtCtxt;๐use rustc_expand::base::ResolverExpand;๐use rustc_expand::expand::AstFragment;๐use rustc_expand::expand::ExpansionConfig;๐use rustc_feature::Features;๐use rustc_lint_defs::builtin::UNNAMEABLE_TEST_ITEMS;๐use rustc_session::Session;๐use rustc_span::hygiene::AstPass;๐use rustc_span::hygiene::SyntaxContext;๐use rustc_span::hygiene::Transparency;๐use rustc_span::DUMMY_SP;๐use rustc_span::Ident;๐use rustc_span::Span;๐use rustc_span::Symbol;๐use rustc_span::sym;๐use rustc_target::spec::PanicStrategy;๐use smallvec::smallvec;๐use thin_vec::ThinVec;๐use thin_vec::thin_vec;๐use tracing::debug;๐use crate::diagnostics;๐use rustc_ast::mut_visit::*;๐
Structsยง
- Entry
Point ๐Cleaner - A folder used to remove any entry points (like fn main) because the harness coroutine will provide its own
- Inner
Item ๐Linter - Test ๐
- Test
Ctxt ๐ - Test
Harness ๐Generator
Functionsยง
- add_
main ๐ - Creates a function item for use as the main function of a test build.
This function will call the
test_runneras specified by the crate attribute - entry_
point_ ๐type - generate_
test_ ๐harness - Crawl over the crate, inserting test reexports and the test main function
- get_
test_ ๐name - get_
test_ ๐runner - inject
- Traverse the crate, collecting all the test functions, eliding any existing main functions, and synthesizing a main test harness
- mk_
tests_ ๐slice - Creates a slice containing every test like so: &[&test1, &test2]