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

Extract into function assist allows extracting unmatched braces #7748

Closed
Veykril opened this issue Feb 22, 2021 · 0 comments · Fixed by #9722
Closed

Extract into function assist allows extracting unmatched braces #7748

Veykril opened this issue Feb 22, 2021 · 0 comments · Fixed by #9722
Labels
A-assists S-actionable Someone could pick this issue up and work on it right now

Comments

@Veykril
Copy link
Member

Veykril commented Feb 22, 2021

You can basically just extract braces it seems?
Fuq6rcJ3Sn
To clarify this:

impl ... {
    pub fn as_str(&self) -> &str {
        &self.0$0
    }$0
}

becomes

impl ... {
    pub fn as_str(&self) -> &str {
        &self.0fun_name();
}

fn fun_name() {
}

The assist really shouldn't be applicable with that selection.

@Veykril Veykril added S-actionable Someone could pick this issue up and work on it right now A-assists labels Feb 22, 2021
bors bot added a commit that referenced this issue Jul 29, 2021
9722: fix: Refine extraction targets of extract_function assist r=Veykril a=Veykril

Closes #7748
bors r+

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
@bors bors bot closed this as completed in 1323dd7 Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-assists S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant