mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
Clippy
This commit is contained in:
parent
e296d35bcd
commit
d660016b53
4 changed files with 8 additions and 9 deletions
|
@ -744,7 +744,7 @@ impl<'a> WasmBackend<'a> {
|
||||||
let mut current_stmt = stmt;
|
let mut current_stmt = stmt;
|
||||||
while let Stmt::Let(sym, expr, layout, following) = current_stmt {
|
while let Stmt::Let(sym, expr, layout, following) = current_stmt {
|
||||||
if DEBUG_SETTINGS.let_stmt_ir {
|
if DEBUG_SETTINGS.let_stmt_ir {
|
||||||
print!("\nlet {:?} = {}", sym, expr.to_pretty(200));
|
print!("\nlet {:?} = {}", sym, expr.to_pretty(200, true));
|
||||||
}
|
}
|
||||||
|
|
||||||
let kind = match following {
|
let kind = match following {
|
||||||
|
@ -974,7 +974,7 @@ impl<'a> WasmBackend<'a> {
|
||||||
self.register_symbol_debug_names();
|
self.register_symbol_debug_names();
|
||||||
println!(
|
println!(
|
||||||
"## rc_stmt:\n{}\n{:?}",
|
"## rc_stmt:\n{}\n{:?}",
|
||||||
rc_stmt.to_pretty(self.env.layout_interner, 200),
|
rc_stmt.to_pretty(self.env.layout_interner, 200, true),
|
||||||
rc_stmt
|
rc_stmt
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1078,7 +1078,7 @@ impl<'a> WasmBackend<'a> {
|
||||||
Expr::Reset { symbol: arg, .. } => self.expr_reset(*arg, sym, storage),
|
Expr::Reset { symbol: arg, .. } => self.expr_reset(*arg, sym, storage),
|
||||||
|
|
||||||
Expr::RuntimeErrorFunction(_) => {
|
Expr::RuntimeErrorFunction(_) => {
|
||||||
todo!("Expression `{}`", expr.to_pretty(100))
|
todo!("Expression `{}`", expr.to_pretty(100, false))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,7 +143,7 @@ pub fn build_app_module<'a>(
|
||||||
if DEBUG_SETTINGS.user_procs_ir {
|
if DEBUG_SETTINGS.user_procs_ir {
|
||||||
println!("## procs");
|
println!("## procs");
|
||||||
for proc in procs.iter() {
|
for proc in procs.iter() {
|
||||||
println!("{}", proc.to_pretty(env.layout_interner, 200));
|
println!("{}", proc.to_pretty(env.layout_interner, 200, true));
|
||||||
// println!("{:?}", proc);
|
// println!("{:?}", proc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ pub fn build_app_module<'a>(
|
||||||
if DEBUG_SETTINGS.helper_procs_ir {
|
if DEBUG_SETTINGS.helper_procs_ir {
|
||||||
println!("## helper_procs");
|
println!("## helper_procs");
|
||||||
for proc in helper_procs.iter() {
|
for proc in helper_procs.iter() {
|
||||||
println!("{}", proc.to_pretty(env.layout_interner, 200));
|
println!("{}", proc.to_pretty(env.layout_interner, 200, true));
|
||||||
// println!("{:#?}", proc);
|
// println!("{:#?}", proc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,12 +102,11 @@ fn format_sourced_doc<'d>(f: &'d Arena<'d>, line: usize, source: &str, doc: Doc<
|
||||||
|
|
||||||
fn format_header<'d>(f: &'d Arena<'d>, title: &str) -> Doc<'d> {
|
fn format_header<'d>(f: &'d Arena<'d>, title: &str) -> Doc<'d> {
|
||||||
let title_width = title.len() + 4;
|
let title_width = title.len() + 4;
|
||||||
let header = f.text(format!(
|
f.text(format!(
|
||||||
"── {} {}",
|
"── {} {}",
|
||||||
title,
|
title,
|
||||||
"─".repeat(HEADER_WIDTH - title_width)
|
"─".repeat(HEADER_WIDTH - title_width)
|
||||||
));
|
))
|
||||||
header
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn format_kind<'a, 'd, I>(
|
fn format_kind<'a, 'd, I>(
|
||||||
|
|
|
@ -148,7 +148,7 @@ fn compiles_to_ir(test_name: &str, src: &str, no_check: bool) {
|
||||||
let main_fn_symbol = exposed_to_host.values.keys().copied().next().unwrap();
|
let main_fn_symbol = exposed_to_host.values.keys().copied().next().unwrap();
|
||||||
|
|
||||||
if !no_check {
|
if !no_check {
|
||||||
check_procedures(&arena, &interns, &layout_interner, &procedures);
|
check_procedures(arena, &interns, &layout_interner, &procedures);
|
||||||
}
|
}
|
||||||
|
|
||||||
verify_procedures(test_name, layout_interner, procedures, main_fn_symbol);
|
verify_procedures(test_name, layout_interner, procedures, main_fn_symbol);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue