Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If function body can be converted to loop { } and function returns (), delete function body #29

Open
Luk-ESC opened this issue Aug 30, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@Luk-ESC
Copy link

Luk-ESC commented Aug 30, 2023

(Minimized with cargo minimize --verify-fn='|output| output.status == Some(0)')

Currently:

fn main() {
    println!("hi");
}

Turns into

fn main() {
    loop { }
}

When it could be:

fn main() {}
@Nilstrieb Nilstrieb added the enhancement New feature or request label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants