Skip to content

generate_function assist: convert arg names to lower snake case #7894

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

Merged
merged 1 commit into from
Mar 6, 2021

Conversation

JoshMcguigan
Copy link
Contributor

This PR fixes one of the points listed by @TimoFreiberg in #3639. Specifically that all generated argument names should be converted to lower snake case.

struct BazBaz;

fn foo() {
    bar$0(BazBaz);
    // ^ when triggering the assist here, you get the output below
}

// BEFORE
fn bar(BazBaz: BazBaz) ${0:-> ()} {
    todo!()
}

// AFTER
fn bar(baz_baz: BazBaz) ${0:-> ()} {
    todo!()
}

@Veykril
Copy link
Member

Veykril commented Mar 6, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 6, 2021

@bors bors bot merged commit 71b8fb7 into rust-lang:master Mar 6, 2021
@lnicola
Copy link
Member

lnicola commented Mar 8, 2021

args

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants