Skip to content

Spurious clone for cast'ed fn ptrs #245

Description

@nunoplopes

This:

void f(int (*a)()) {
  (void)a;
}

Produces:

pub fn f_0(a: Ptr<i32>) {
    let a: Value<Ptr<i32>> = Rc::new(RefCell::new(a));
    (*a.borrow()).clone();   // <-- unneded clone
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance issues or proposals for reducing overhead

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions