mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Convert unused dbg!()s to eprintln!()s
This makes it nicer to work with dbg! normally, because grepping the code base for dbg!() reveals only the usages of it that are currently active.
This commit is contained in:
parent
21b555d0b2
commit
bc0c9250f9
10 changed files with 9 additions and 17 deletions
|
@ -164,7 +164,7 @@ pub fn unwrap_suffixed_expression<'a>(
|
|||
// USEFUL TO SEE THE UNWRAPPING
|
||||
// OF AST NODES AS THEY DESCEND
|
||||
// if is_expr_suffixed(&loc_expr.value) {
|
||||
// dbg!(&maybe_def_pat, &loc_expr, &unwrapped_expression);
|
||||
// eprintln!("{:?}, {:?}, {:?}", &maybe_def_pat, &loc_expr, &unwrapped_expression);
|
||||
// }
|
||||
|
||||
unwrapped_expression
|
||||
|
|
|
@ -19,7 +19,7 @@ macro_rules! run_jit_function_raw {
|
|||
let result = main();
|
||||
|
||||
if !$errors.is_empty() {
|
||||
dbg!(&$errors);
|
||||
eprintln!("{:?}", &$errors);
|
||||
|
||||
assert_eq!(
|
||||
$errors,
|
||||
|
|
|
@ -372,10 +372,10 @@ mod test_parse {
|
|||
let parsed = parse_module_defs(arena, state, ast::Defs::default());
|
||||
match parsed {
|
||||
Ok(_) => {
|
||||
// dbg!(_state);
|
||||
// eprintln!("{:?}", _state);
|
||||
}
|
||||
Err(_) => {
|
||||
// dbg!(_fail, _state);
|
||||
// eprintln!("{:?}, {:?}", _fail, _state);
|
||||
panic!("Failed to parse!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,7 +155,7 @@ impl<'a, 'c, 'd, 'e, 'f, 'm, 'p, P: Push<Problem>> Env<'a, 'c, 'd, 'e, 'f, 'm, '
|
|||
}
|
||||
|
||||
// Convert the Content to a MonoType, often by passing an iterator. None of these iterators introduce allocations.
|
||||
let mono_id = match dbg!(*subs.get_content_without_compacting(root_var)) {
|
||||
let mono_id = match *subs.get_content_without_compacting(root_var) {
|
||||
Content::Structure(flat_type) => match flat_type {
|
||||
FlatType::Apply(symbol, args) => {
|
||||
if symbol.is_builtin() {
|
||||
|
|
|
@ -340,8 +340,6 @@ pub(crate) fn asm_evals_to<T, U, F>(
|
|||
let result = crate::helpers::dev::run_test_main::<T>(&lib);
|
||||
|
||||
if !errors.is_empty() {
|
||||
dbg!(&errors);
|
||||
|
||||
assert_eq!(
|
||||
errors,
|
||||
std::vec::Vec::new(),
|
||||
|
|
|
@ -448,9 +448,9 @@ fn debug_print_unified_types<M: MetaCollector>(
|
|||
// let (type1, _problems1) = subs.var_to_error_type(ctx.first);
|
||||
// let (type2, _problems2) = subs.var_to_error_type(ctx.second);
|
||||
// println!("\n --------------- \n");
|
||||
// dbg!(ctx.first, type1);
|
||||
// eprintln!("{:?}, {:?}", ctx.first, type1);
|
||||
// println!("\n --- \n");
|
||||
// dbg!(ctx.second, type2);
|
||||
// eprintln!({:?}, {:?}", ctx.second, type2);
|
||||
// println!("\n --------------- \n");
|
||||
let content_1 = env.get(ctx.first).content;
|
||||
let content_2 = env.get(ctx.second).content;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue