Skip to content

Commit

Permalink
manual clippy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertdev committed Jul 5, 2023
1 parent d997c60 commit 22a822a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions crates/compiler/gen_llvm/src/llvm/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use roc_target::TargetInfo;

use super::struct_::RocStruct;

pub fn basic_type_from_layout<'a, 'ctx, 'env>(
env: &Env<'a, 'ctx, 'env>,
pub fn basic_type_from_layout<'a, 'ctx>(
env: &Env<'a, 'ctx, '_>,
layout_interner: &STLayoutInterner<'a>,
layout: LayoutRepr<'_>,
) -> BasicTypeEnum<'ctx> {
Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/gen_llvm/src/llvm/lowlevel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ fn throw_on_overflow<'ctx>(
.unwrap()
}

fn throw_because_overflow<'ctx>(env: &Env<'_, 'ctx, '_>, message: &str) {
fn throw_because_overflow(env: &Env<'_, '_, '_>, 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();

Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/gen_llvm/src/llvm/struct_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ fn index_struct_ptr<'a, 'ctx>(
let field_layout = field_layouts[index as usize];
let field_repr = layout_interner.get_repr(field_layout);

let name = format!("struct_field_access_record_{}", index);
let name = format!("struct_field_access_record_{index}");
let field_value = env
.builder
.new_build_struct_gep(struct_type, ptr, index as u32, &name)
Expand Down
2 changes: 1 addition & 1 deletion crates/compiler/mono/src/drop_specialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ impl<'a> DropSpecializationEnvironment<'a> {
}
}

fn create_symbol<'i>(&self, ident_ids: &'i mut IdentIds, debug_name: &str) -> Symbol {
fn create_symbol(&self, ident_ids: &mut IdentIds, debug_name: &str) -> Symbol {
let ident_id = ident_ids.add_str(debug_name);
Symbol::new(self.home, ident_id)
}
Expand Down
4 changes: 2 additions & 2 deletions crates/compiler/mono/src/reset_reuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1404,8 +1404,8 @@ fn drop_unused_reuse_tokens<'a>(
})
}

fn get_reuse_layout_info<'a, 'i>(
layout_interner: &'i STLayoutInterner<'a>,
fn get_reuse_layout_info<'a>(
layout_interner: &STLayoutInterner<'a>,
union_layout: UnionLayout<'a>,
) -> TokenLayout {
let (size, alignment) = union_layout.data_size_and_alignment(layout_interner);
Expand Down
4 changes: 2 additions & 2 deletions crates/compiler/mono/src/tail_recursion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,9 @@ where
candidate_set
}

fn trmc_candidates_help<'a>(
fn trmc_candidates_help(
function_name: LambdaName,
stmt: &'_ Stmt<'a>,
stmt: &'_ Stmt<'_>,
candidates: &mut TrmcCandidateSet,
) {
// if this stmt is the literal tail tag application and return, then this is a TRMC opportunity
Expand Down

0 comments on commit 22a822a

Please sign in to comment.