diff options
author | blyxyas <blyxyas@gmail.com> | 2023-04-09 21:37:31 +0200 |
---|---|---|
committer | blyxyas <blyxyas@gmail.com> | 2023-04-09 21:37:31 +0200 |
commit | 2c976765b8e426506285b334e0a1506c78b135e2 (patch) | |
tree | 00ba1bc5b3a493110076b1b4842c899d0659fe62 /compiler/rustc_interface | |
parent | 28e19f19aaa9388814fb0cc358e18258127397f3 (diff) | |
download | rust-2c976765b8e426506285b334e0a1506c78b135e2.tar.gz |
Migrate `sess.opts.tests` uses to `sess.is_test_crate()`
Diffstat (limited to 'compiler/rustc_interface')
-rw-r--r-- | compiler/rustc_interface/src/passes.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_interface/src/passes.rs b/compiler/rustc_interface/src/passes.rs index 8d4892470ac..0e4e20c7cd1 100644 --- a/compiler/rustc_interface/src/passes.rs +++ b/compiler/rustc_interface/src/passes.rs @@ -230,7 +230,7 @@ fn configure_and_expand( features: Some(features), recursion_limit, trace_mac: sess.opts.unstable_opts.trace_macros, - should_test: sess.opts.test, + should_test: sess.is_test_crate(), span_debug: sess.opts.unstable_opts.span_debug, proc_macro_backtrace: sess.opts.unstable_opts.proc_macro_backtrace, ..rustc_expand::expand::ExpansionConfig::default(crate_name.to_string()) @@ -292,7 +292,7 @@ fn configure_and_expand( } sess.time("maybe_create_a_macro_crate", || { - let is_test_crate = sess.opts.test; + let is_test_crate = sess.is_test_crate(); rustc_builtin_macros::proc_macro_harness::inject( &mut krate, sess, |