rust/crates/syntax
bors f4fec4ff65 Auto merge of #16378 - roife:fix/issue-15470, r=Veykril
fix: better handling of SelfParam in assist 'inline_call'

fix #15470.

The current `inline_call` directly translates `&self` into `let ref this = ...;` and `&mut self` into `let ref mut this = ...;`. However, it does not handle some complex scenarios.

This PR addresses the following transformations (assuming the receiving object is `obj`):

- `self`: `let this = obj`
- `mut self`: `let mut this = obj`
- `&self`: `let this = &obj`
- `&mut self`
  + If `obj` is `let mut obj = ...`, use a mutable reference: `let this = &mut obj`
  + If `obj` is `let obj = &mut ...;`, perform a reborrow: `let this = &mut *obj`
2024-01-17 08:43:13 +00:00
..
fuzz Use Cargo's [workspace.lints.*] to config clippy 2023-12-29 23:51:32 +09:00
src Auto merge of #16378 - roife:fix/issue-15470, r=Veykril 2024-01-17 08:43:13 +00:00
test_data
Cargo.toml Split out rustc_lexer from rustc_dependencies 2024-01-08 15:24:46 +01:00
rust.ungram fix PathSegment grammar 2023-11-12 11:20:14 +08:00