-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
A-assistsC-bugCategory: bugCategory: bugS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now
Description
In the following, for some selections the "extract into variable" code action is not listed.
fn main() {
let x = Some(1);
let some_condition = false;
let other_condition = matches!(x, None) || some_condition;
// ----------------- not listed
// ------------------ not listed
// ------------------ listed, but includes the whole expression
// ----------------------------------- listed
// -------------- listed
}This fails similarly for other macros (todo, println), with or without arguments.
As a sidenote I find it confusing that selecting a bit of whitespace around an expression ends up selecting more things than just the expression.
jplatte
Metadata
Metadata
Assignees
Labels
A-assistsC-bugCategory: bugCategory: bugS-actionableSomeone could pick this issue up and work on it right nowSomeone could pick this issue up and work on it right now