mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Merge #7405
7405: fill_match_arms: don't duplicate Ident-like arms r=matklad a=bugadani Co-authored-by: Dániel Buga <bugadani@gmail.com>
This commit is contained in:
commit
2664aee8e5
1 changed files with 28 additions and 0 deletions
|
@ -271,6 +271,34 @@ mod tests {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn partial_fill_option() {
|
||||
check_assist(
|
||||
fill_match_arms,
|
||||
r#"
|
||||
enum Option<T> { Some(T), None }
|
||||
use Option::*;
|
||||
|
||||
fn main() {
|
||||
match None$0 {
|
||||
None => {}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
r#"
|
||||
enum Option<T> { Some(T), None }
|
||||
use Option::*;
|
||||
|
||||
fn main() {
|
||||
match None {
|
||||
None => {}
|
||||
Some(${0:_}) => {}
|
||||
}
|
||||
}
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn partial_fill_or_pat() {
|
||||
check_assist(
|
||||
|
|
Loading…
Reference in a new issue