mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 05:33:41 +00:00
Add test_rename_bind_pat
This commit is contained in:
parent
8b73135b11
commit
9fe85e1fdf
@ -1488,4 +1488,39 @@ impl<'yeeee> Foo<'yeeee> for &'yeeee () {
|
||||
"#,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rename_bind_pat() {
|
||||
check(
|
||||
"new_name",
|
||||
r#"
|
||||
fn main() {
|
||||
enum CustomOption<T> {
|
||||
None,
|
||||
Some(T),
|
||||
}
|
||||
|
||||
let test_variable = CustomOption::Some(22);
|
||||
|
||||
match test_variable {
|
||||
CustomOption::Some(foo<|>) if foo == 11 => {}
|
||||
_ => (),
|
||||
}
|
||||
}"#,
|
||||
r#"
|
||||
fn main() {
|
||||
enum CustomOption<T> {
|
||||
None,
|
||||
Some(T),
|
||||
}
|
||||
|
||||
let test_variable = CustomOption::Some(22);
|
||||
|
||||
match test_variable {
|
||||
CustomOption::Some(new_name) if new_name == 11 => {}
|
||||
_ => (),
|
||||
}
|
||||
}"#,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user