diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-26 17:59:06 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-26 17:59:06 +0000 |
commit | 77a447dcda82a9f0eb6e1f04bd4b1dd53a226c65 (patch) | |
tree | e691982730fe01802f874066927b2ebbe8badc75 /crates/ide/src/diagnostics | |
parent | 4ecaad98e074c42dbf637a11afcb630aafffd7b3 (diff) | |
parent | 5ff3299dd61ea5c5790c01819994c9d8fa6afc09 (diff) |
Merge #8191
8191: syntax: return owned string instead of leaking string r=cynecx a=cynecx
Quick hack? to alleviate https://github.com/rust-analyzer/rust-analyzer/issues/8181#issuecomment-806019126. I haven't run any tests but this should affect performance since we are deallocating more.
r? @matklad
Co-authored-by: cynecx <[email protected]>
Diffstat (limited to 'crates/ide/src/diagnostics')
-rw-r--r-- | crates/ide/src/diagnostics/fixes.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs index 2f840909c..5fb3e2d91 100644 --- a/crates/ide/src/diagnostics/fixes.rs +++ b/crates/ide/src/diagnostics/fixes.rs | |||
@@ -210,7 +210,7 @@ fn missing_record_expr_field_fix( | |||
210 | } | 210 | } |
211 | let new_field = make::record_field( | 211 | let new_field = make::record_field( |
212 | None, | 212 | None, |
213 | make::name(record_expr_field.field_name()?.text()), | 213 | make::name(&record_expr_field.field_name()?.text()), |
214 | make::ty(&new_field_type.display_source_code(sema.db, module.into()).ok()?), | 214 | make::ty(&new_field_type.display_source_code(sema.db, module.into()).ok()?), |
215 | ); | 215 | ); |
216 | 216 | ||