| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
| |/ /
|/| | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
8436: Fix extract function's mutability of variables outliving the body r=matklad a=brandondong
**Reproduction:**
```rust
fn main() {
let mut k = 1;
let mut j = 2;
j += 1;
k += j;
}
```
1. Select the first to third lines of the main function. Use the "Extract into function" code assist.
2. The output is the following which does not compile because the outlived variable `k` is declared as immutable:
```rust
fn main() {
let (k, j) = fun_name();
k += j;
}
fn fun_name() -> (i32, i32) {
let mut k = 1;
let mut j = 2;
j += 1;
(k, j)
}
```
3. We would instead expect the output to be:
```rust
fn main() {
let (mut k, j) = fun_name();
k += j;
}
```
**Fix:**
- Instead of declaring outlived variables as immutable unconditionally, check for any mutable usages outside of the extracted function.
Co-authored-by: Brandon <[email protected]>
|
| |/ / |
|
| | | |
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
8207: Show dbg remove assist on empty contents r=edwin0cheng a=ivan770
Closes #8185
Co-authored-by: ivan770 <[email protected]>
Co-authored-by: ivan770 <[email protected]>
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
Apply standard test style fixes
Co-authored-by: Aleksey Kladov <[email protected]>
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
8339: fix: extract variable works in guards r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
|
| | |/
| |/|
| | |
| | | |
closes #8336
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
8326: Rewrite reorder fields assist to use mutable syntax trees r=matklad a=Veykril
This also instead uses `Either` to use the typed `RecordPat` and `RecordExpr` nodes, this unfortunately gives a bit of code duplication
Co-authored-by: Lukas Wirth <[email protected]>
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a "Convert Into to From" assist, useful since clippy has
recently started adding lints on every `Into`.
It covers converting the signature, and converting any `self`/`Self`
references within the body to the correct types.
It does assume that every instance of `Into` can be converted to a
`From`, which I _think_ is the case now. Let me know if there's
something I'm not thinking of and I can try and make it smarter.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
8210: Implement "Extract type alias" assist r=jonas-schievink a=jonas-schievink
Co-authored-by: Jonas Schievink <[email protected]>
Co-authored-by: Jonas Schievink <[email protected]>
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
8267: Adding gifs and screenshots for features in manual r=matklad a=MozarellaMan
For #6539
This includes most of gif or screenshot examples of most items in the "Features" header. With the exceptions of:
- **On Typing Assists** - couldn't get it to work for a demo, I'm probably missing something?
- **Structural search and replace** - looked to be already a visual example of the feature
- **Workspace symbol** - wasn't sure how best to show this, all of the examples maybe? Also wasn't sure of the best code example to show it off
- **Semantic Syntax Highlighting** - seemed obvious enough to not need a screenshot, but I could easily add this
All the gifs/pngs are hosted in this [comment](https://github.com/rust-analyzer/rust-analyzer/issues/6539#issuecomment-809574840). Please let me know if any of them aren't suitable (and why) and I'll improve it! Or if you don't like the theme/font
Co-authored-by: Ayomide Bamidele <[email protected]>
|
| | | |
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
8213: Added support for const generics in impl generation r=Veykril a=ivan770
Closes #8211
Co-authored-by: ivan770 <[email protected]>
|
| |/ |
|
|/ |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
8168: correct `convert to guard return` let_stmt r=Veykril a=hi-rustin
close https://github.com/rust-analyzer/rust-analyzer/issues/8074
Co-authored-by: hi-rustin <[email protected]>
|
| |
| |
| |
| |
| |
| |
| |
| | |
fix
fix
add check
|
| | |
|
| |
| |
| |
| | |
changelog: skip
|
| | |
|
| |
| |
| |
| | |
changelog skip
|
|/
|
|
| |
changelog: skip
|
|
|
|
| |
changelog internal
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
8119: Don't return a SourceChange on WillRenameFiles when nothing gets refactored r=Veykril a=Veykril
bors r+
Co-authored-by: Lukas Wirth <[email protected]>
|
| | |
|
|/
|
|
| |
changelog skip
|
| |
|
| |
|
|
|
|
| |
(clippy::bind_instead_of_map)
|
| |
|
|
|
|
| |
changelog: skip
|