We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_test_crate
1 parent 709a97f commit 28e19f1Copy full SHA for 28e19f1
compiler/rustc_session/src/session.rs
@@ -294,6 +294,11 @@ impl Session {
294
self.crate_types.get().unwrap().as_slice()
295
}
296
297
+ /// Returns true if the crate is a testing one.
298
+ pub fn is_test_crate(&self) -> bool {
299
+ self.opts.test
300
+ }
301
+
302
pub fn needs_crate_hash(&self) -> bool {
303
// Why is the crate hash needed for these configurations?
304
// - debug_assertions: for the "fingerprint the result" check in
0 commit comments