8496: Exclude nightly tag from git describe to fix version string r=lnicola a=lnicola
Otherwise if we run `git describe` on the release day we pick up the `nightly` tag from the previous release.
changelog fix
bors r+
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
Conceptually, using a *message* here is wrong, because this is a
"status", rather than "point in time" thing. But statuses are an LSP
extension, while messages are stable. As a compromise, send message only
for more critical `metadata` failures, and only once per state change.
8469: Remove assertion in impl collection r=flodiebold a=flodiebold
This condition should always be true for *valid* code, but of course
there might be invalid code or things that we can't currently resolve.
Fixes#8464.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
This condition should always be true for *valid* code, but of course
there might be invalid code or things that we can't currently resolve.
Fixes#8464.
8463: Support macros in pattern position r=jonas-schievink a=jonas-schievink
This was fairly easy, because patterns are limited to bodies, so almost all changes were inside body lowering.
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
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 <brandondong604@hotmail.com>
8410: Use CompletionTextEdit::InsertAndReplace if supported by the client r=Veykril a=Veykril
Fixes#8404, Fixes#3130
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
8447: Resolve prelude and crate root names in the root DefMap r=jonas-schievink a=jonas-schievink
Should fix https://github.com/rust-analyzer/rust-analyzer/issues/8418
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>