mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
fix: use raw idents in make::name{_ref}
with keywords
This commit is contained in:
parent
a8da2ca3a1
commit
e2b664e9fd
2 changed files with 32 additions and 2 deletions
|
@ -653,6 +653,26 @@ fn test_fn() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_fill_struct_fields_raw_ident() {
|
||||
check_fix(
|
||||
r#"
|
||||
struct TestStruct { r#type: u8 }
|
||||
|
||||
fn test_fn() {
|
||||
TestStruct { $0 };
|
||||
}
|
||||
"#,
|
||||
r"
|
||||
struct TestStruct { r#type: u8 }
|
||||
|
||||
fn test_fn() {
|
||||
TestStruct { r#type: () };
|
||||
}
|
||||
",
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_fill_struct_fields_no_diagnostic() {
|
||||
check_no_diagnostics(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue