Releases: rust-lang/rust-analyzer
Releases · rust-lang/rust-analyzer
2021-10-04
Merge #10442 10442: fix: Limit depth to 1 when searching for `Cargo.toml` r=matklad a=lnicola ...and add `rust-project.json`. More or less fixes #7268 Co-authored-by: Laurențiu Nicola <[email protected]>
2021-09-27
Merge #10360 10360: headsup: matklad rewrites blocks grammar again :) r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2021-09-20
Merge #10293 10293: fix: Don't bail on parse errors in macro input for builtin expansion r=Veykril a=Veykril Fixes https://github.com/rust-analyzer/rust-analyzer/issues/8158 Co-authored-by: Lukas Wirth <[email protected]>
2021-09-13
Merge #10215 10215: Use correct file syntax node for decl_access computation in find_all_refs r=Veykril a=Veykril Defs and refs of locals only ever life in one file, this isn't true for fields though. Fixes https://github.com/rust-analyzer/rust-analyzer/issues/10201 bors r+ Co-authored-by: Lukas Wirth <[email protected]>
2021-09-06
Merge #10161 10161: Don't dump `DefMap`s to build the panic context r=matklad a=matklad internal: remove accidental code re-use FragmentKind played two roles: * entry point to the parser * syntactic category of a macro call These are different use-cases, and warrant different types. For example, macro can't expand to visibility, but we have such fragment today. This PR introduces `ExpandsTo` enum to separate this two use-cases. I suspect we might further split `FragmentKind` into `$x:specifier` enum specific to MBE, and a general parser entry point, but that's for another PR! bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2021-08-30
Merge #10074 10074: internal: improve compile times a bit r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2021-08-23
Merge #9989 9989: Fix two more “a”/“an” typos (this time the other way) r=lnicola a=steffahn Follow-up to #9987 you guys are still merging these fast :sweat_smile: _this time I thought – for sure – that I’d get this commit into #9987 before it’s merged…_ Co-authored-by: Frank Steffahn <[email protected]>
2021-08-16
Merge #9905 9905: internal: optimize compile time r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
2021-08-09
Merge #9814
9814: Generate default impl when converting `#[derive(Debug)]` to manual impl r=yoshuawuyts a=yoshuawuyts
This patch makes it so when you convert `#[derive(Debug)]` to a manual impl, a default body is provided that's equivalent to the original output of `#[derive(Debug)]`. This should make it drastically easier to write custom `Debug` impls, especially when all you want to do is quickly omit a single field which is `!Debug`.
This is implemented for enums, record structs, tuple structs, empty structs - and it sets us up to implement variations on this in the future for other traits (like `PartialEq` and `Hash`).
Thanks!
## Codegen diff
This is the difference in codegen for record structs with this patch:
```diff
struct Foo {
bar: String,
}
impl fmt::Debug for Foo {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
- todo!();
+ f.debug_struct("Foo").field("bar", &self.bar).finish()
}
}
```
Co-authored-by: Irina Shestak <[email protected]>
Co-authored-by: Yoshua Wuyts <[email protected]>
Co-authored-by: Yoshua Wuyts <[email protected]>
2021-08-02
Merge #9750 9750: Link “DST” to its definition r=lnicola a=gthb Being new to Rust I wasn't familiar with this acronym and found it hard to guess (the context of syntax trees biased me to reading it as a D-something Syntax Tree and trying to guess what the D was), hard to google (in retrospect googling "rust dst" does the job, but I thought it was an abstract structure thing, not Rust-specific), and hard to Github-search, because `dst` is commonly short for “destination” in code. Alternatively `<abbr title="dynamically sized type">DST</abbr>` would be about as helpful. Co-authored-by: Gunnlaugur Thor Briem <[email protected]>