Skip to content

Feature Request: Rust support function override #44408

@ghost

Description

I hope rust can support function override, In real development world. we import a library, and may be want to override one function of the library.

Example origin func

fn add_one(x: i32) -> i32 {
    x + 1
}

we want to add log in the function

fn add_one(x: i32) -> i32 {
   log('The input number was {} ', x);
   x + 1
}

We only want to override the function , not want to fork the whole library and modify the library.

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