10722: fix: Fix proc-macro attributes being shadowed by their functions in IDE layer r=Veykril a=Veykril
We sometimes still didn't resolve proc-macro attrs in attribute paths in the ide crates due to their function definitions resolving first.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10688: internal: Type-check TS on CI and also turn off the strict setting `useUnknownInCatchVariables` r=lnicola a=ChayimFriedman2
We don't follow it and I found that turning it on will have little benefit.
I'm not sure if we should also type-check when building in launch.json.
Co-authored-by: Chayim Refael Friedman <chayimfr@gmail.com>
10699: internal: Make CompletionItem `label` and `lookup` fields `SmolStr`s r=Veykril a=Veykril
This replaces a bunch of String clones with SmolStr clones, though also makes a few parts a bit more expensive(mainly things involving `format!`ted strings as labels).
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10704: internal: Short-circuit `descend_into_macros_single` r=Veykril a=Veykril
There is no need to descend everything if all we are interested in is the first mapping.
This bring `descend_into_macros` timing in highlighting in `rust-analyzer/src/config.rs` from `154ms - descend_into_macros (2190 calls)` to `24ms - descend_into_macros (2190 calls)` since we use the single variant there(will regress once we want to highlight multiple namespaces again though).
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10703: internal: Don't check items for macro calls if they have no attributes r=Veykril a=Veykril
Turns out when highlighting we currently populate the Dynmaps of pretty much every item in a file, who would've known that would be so costly...
Shaves off 250 ms for the integrated benchmark on `rust-analyzer/src/config.rs`.
We are still looking at a heft `154ms - descend_into_macros (2190 calls)` but I feel like this is slowly nearing towards just call overhead.
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10701: internal: Cache ast::MacroCalls to their expansions in Semantics::descend_into_macros_impl r=Veykril a=Veykril
Saves ~45ms when highlighting `rust-analyzer/src/config.rs` for me
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10696: internal: Replace more Name::to_string usages with Name::to_smol_str r=Veykril a=Veykril
Gets rid of some more unnecessary string allocs
bors r+
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10686: internal: Add `Semantics::original_ast_node` for upmapping nodes out of macro files r=Veykril a=Veykril
Fixes trying to insert imports into macro expanded files which then do text edits on very wrong text ranges.
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
10683: minor: Use `.into_iter()` method on array to avoid dereference r=lnicola a=arzg
Arguably it’s nicer to just use `.into_iter()` instead of iterating over references which are immediately dereferenced.
I also changed the use of `String::from` to `.to_string()` because the latter has around twenty times more usages in rust-analyzer.
Co-authored-by: Aramis Razzaghipour <aramisnoah@gmail.com>
10672: feat: upgrade ubuntu builders r=matklad a=matklad
For `-gnu` triples, use 20.04, the current LTS. This upgrades the
required version of glibc. For musl, just use `latest` as, presumably,
we don't care about glibc version in that case.
Hopefully, this unbreaks nightly publishing!
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
For `-gnu` triples, use 20.04, the current LTS. This upgrades the
required version of glibc. For musl, just use `latest` as, presumably,
we don't care about glibc version in that case.