1
Fork 0

Add little is_test_crate function

This commit is contained in:
blyxyas 2023-04-05 23:36:40 +02:00
parent 709a97fffe
commit 28e19f19aa
No known key found for this signature in database
GPG key ID: 4D38170B5A2FC334

View file

@ -294,6 +294,11 @@ impl Session {
self.crate_types.get().unwrap().as_slice()
}
/// Returns true if the crate is a testing one.
pub fn is_test_crate(&self) -> bool {
self.opts.test
}
pub fn needs_crate_hash(&self) -> bool {
// Why is the crate hash needed for these configurations?
// - debug_assertions: for the "fingerprint the result" check in