Turn some asserts into debug_asserts

This commit is contained in:
John Kåre Alsaker 2018-12-11 17:17:09 +01:00
parent c66b84457f
commit 8e53ecff6c

View file

@ -314,7 +314,7 @@ macro_rules! define_dep_nodes {
pub fn from_def_path_hash(kind: DepKind,
def_path_hash: DefPathHash)
-> DepNode {
assert!(kind.can_reconstruct_query_key() && kind.has_params());
debug_assert!(kind.can_reconstruct_query_key() && kind.has_params());
DepNode {
kind,
hash: def_path_hash.0,
@ -326,7 +326,7 @@ macro_rules! define_dep_nodes {
/// does not require any parameters.
#[inline(always)]
pub fn new_no_params(kind: DepKind) -> DepNode {
assert!(!kind.has_params_inlined());
debug_assert!(!kind.has_params_inlined());
DepNode {
kind,
hash: Fingerprint::ZERO,