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_session/src | |
| parent | 28e19f19aaa9388814fb0cc358e18258127397f3 (diff) | |
| download | rust-2c976765b8e426506285b334e0a1506c78b135e2.tar.gz rust-2c976765b8e426506285b334e0a1506c78b135e2.zip | |
Migrate `sess.opts.tests` uses to `sess.is_test_crate()`
Diffstat (limited to 'compiler/rustc_session/src')
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index de0ddb53fa4..613abaa8e3c 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -1258,7 +1258,7 @@ pub fn build_configuration(sess: &Session, mut user_cfg: CrateConfig) -> CrateCo // some default and generated configuration items. let default_cfg = default_configuration(sess); // If the user wants a test runner, then add the test cfg. - if sess.opts.test { + if sess.is_test_crate() { user_cfg.insert((sym::test, None)); } user_cfg.extend(default_cfg.iter().cloned()); |
