1
Fork 0

expand: Pass ast::Crate by reference to AST transforming passes

Also some more attributes are passed by reference.
This commit is contained in:
Vadim Petrochenkov 2023-02-18 16:23:57 +04:00
parent 84dd6dfd9d
commit 6cc33b7691
9 changed files with 62 additions and 79 deletions

View file

@ -37,7 +37,7 @@ struct TestCtxt<'a> {
/// Traverse the crate, collecting all the test functions, eliding any
/// existing main functions, and synthesizing a main test harness
pub fn inject(sess: &Session, resolver: &mut dyn ResolverExpand, krate: &mut ast::Crate) {
pub fn inject(krate: &mut ast::Crate, sess: &Session, resolver: &mut dyn ResolverExpand) {
let span_diagnostic = sess.diagnostic();
let panic_strategy = sess.panic_strategy();
let platform_panic_strategy = sess.target.panic_strategy;