mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
clippy
This commit is contained in:
parent
38da99b1ac
commit
65a9febe7d
1 changed files with 8 additions and 12 deletions
|
@ -1724,9 +1724,9 @@ fn modify_refcount_union_help<'a, 'ctx, 'env>(
|
|||
if let Layout::RecursivePointer = field_layout {
|
||||
panic!("non-recursive tag unions cannot contain naked recursion pointers!");
|
||||
} else if field_layout.contains_refcounted() {
|
||||
// crazy hack
|
||||
match field_layout {
|
||||
Layout::Builtin(Builtin::Str | Builtin::List(_)) => {
|
||||
// crazy hack: inlining this function when it decrements a list or string results
|
||||
// in many, many valgrind errors in `--optimize` mode. We do not know why.
|
||||
if let Layout::Builtin(Builtin::Str | Builtin::List(_)) = field_layout {
|
||||
use inkwell::attributes::{Attribute, AttributeLoc};
|
||||
let kind_id = Attribute::get_named_enum_kind_id("noinline");
|
||||
debug_assert!(kind_id > 0);
|
||||
|
@ -1734,10 +1734,6 @@ fn modify_refcount_union_help<'a, 'ctx, 'env>(
|
|||
|
||||
fn_val.add_attribute(AttributeLoc::Function, enum_attr);
|
||||
}
|
||||
_ => {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
let field_ptr = env
|
||||
.builder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue