mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
clippy
This commit is contained in:
parent
b9b486e4b0
commit
b497c76e44
1 changed files with 3 additions and 10 deletions
|
@ -56,15 +56,12 @@ use crate::llvm::{
|
|||
refcounting::PointerToRefcount,
|
||||
};
|
||||
|
||||
use super::{build::Env, convert::zig_dec_type};
|
||||
use super::{
|
||||
build::{throw_internal_exception, use_roc_value, FAST_CALL_CONV},
|
||||
convert::zig_with_overflow_roc_dec,
|
||||
scope::Scope,
|
||||
};
|
||||
use super::{
|
||||
build::{Env, FunctionSpec},
|
||||
convert::zig_dec_type,
|
||||
};
|
||||
|
||||
pub(crate) fn run_low_level<'a, 'ctx>(
|
||||
env: &Env<'a, 'ctx, '_>,
|
||||
|
@ -1821,7 +1818,7 @@ fn throw_on_overflow<'ctx>(
|
|||
|
||||
bd.position_at_end(throw_block);
|
||||
|
||||
throw_on_overflow_help(env, result, message);
|
||||
throw_because_overflow(env, message);
|
||||
|
||||
bd.position_at_end(then_block);
|
||||
|
||||
|
@ -1829,11 +1826,7 @@ fn throw_on_overflow<'ctx>(
|
|||
.unwrap()
|
||||
}
|
||||
|
||||
fn throw_on_overflow_help<'ctx>(
|
||||
env: &Env<'_, 'ctx, '_>,
|
||||
result: StructValue<'ctx>, // of the form { value: T, has_overflowed: bool }
|
||||
message: &str,
|
||||
) {
|
||||
fn throw_because_overflow<'ctx>(env: &Env<'_, 'ctx, '_>, message: &str) {
|
||||
let block = env.builder.get_insert_block().expect("to be in a function");
|
||||
let di_location = env.builder.get_current_debug_location().unwrap();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue