Don't log type mismatch info in release builds

This commit is contained in:
Richard Feldman 2020-05-25 23:41:37 -04:00
parent c386192e8b
commit f31e260e2f

View file

@ -17,6 +17,7 @@ macro_rules! mismatch {
column!() column!()
); );
} }
vec![Mismatch::TypeMismatch] vec![Mismatch::TypeMismatch]
}}; }};
($msg:expr) => {{ ($msg:expr) => {{
@ -27,9 +28,10 @@ macro_rules! mismatch {
line!(), line!(),
column!() column!()
); );
println!($msg);
println!("");
} }
println!($msg);
println!("");
vec![Mismatch::TypeMismatch] vec![Mismatch::TypeMismatch]
}}; }};
($msg:expr,) => {{ ($msg:expr,) => {{
@ -40,9 +42,10 @@ macro_rules! mismatch {
line!(), line!(),
column!() column!()
); );
println!($msg);
println!("");
} }
println!($msg);
println!("");
vec![Mismatch::TypeMismatch] vec![Mismatch::TypeMismatch]
}}; }};
($msg:expr, $($arg:tt)*) => {{ ($msg:expr, $($arg:tt)*) => {{
@ -53,9 +56,10 @@ macro_rules! mismatch {
line!(), line!(),
column!() column!()
); );
println!($msg, $($arg)*);
println!("");
} }
println!($msg, $($arg)*);
println!("");
vec![Mismatch::TypeMismatch] vec![Mismatch::TypeMismatch]
}}; }};
} }