Skip to content

Misleading argument name dest #1798

@smoelius

Description

@smoelius

There are several functions with an argument named dest, suggesting "destination". However, the argument is not the destination written to, but rather the value written to that destination. (An example appears below.)

Would you consider a PR to rename all such dest arguments to value?


storage_store_slot is an example:

/// Recursively store a type to storage for slot-based storage
fn storage_store_slot<'a>(
&self,
bin: &Binary<'a>,
ty: &Type,
slot: &mut IntValue<'a>,
slot_ptr: PointerValue<'a>,
dest: BasicValueEnum<'a>,
function: FunctionValue<'a>,
ns: &Namespace,
);

Here is an example of its use; note that the argument dest is elem.into():

self.storage_store_slot(
bin,
elem_ty,
slot,
slot_ptr,
elem.into(),
function,
ns,
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions