about summary refs log tree commit diff
path: root/src/tools/rust-analyzer/crates/ide-db
AgeCommit message (Collapse)AuthorLines
2025-09-26Merge pull request #20736 from A4-Tacks/fix-invert-if-let-chainShoyu Vanilla (Flint)-4/+1
Fix applicable on if-let-chain for invert_if
2025-09-24Fix applicable on if-let-chain for invert_ifA4-Tacks-4/+1
Example --- ```rust fn f() { i$0f x && let Some(_) = Some(1) { 1 } else { 0 } } ``` **Before this PR**: ```rust fn f() { if !(x && let Some(_) = Some(1)) { 0 } else { 1 } } ``` **After this PR**: Assist not applicable
2025-09-23Remove lower::value_ty in favor of lower_nextsolver::value_tyJack Huey-1/+1
2025-09-16Merge pull request #20517 from Veykril/veykril/push-wrurmtqppzusLukas Wirth-7/+24
fix: Only compute unstable paths on nightly toolchains for IDE features
2025-09-16fix: Only compute unstable paths on nightly toolchains for IDE featuresLukas Wirth-7/+24
2025-09-08Merge pull request #20632 from rmehri01/navigation-on-primsChayim Refael Friedman-1/+5
feat: support navigation on primitives
2025-09-08impl TryToNav for BuiltinType insteadRyan Mehri-0/+4
2025-09-08feat: support navigation on primitivesRyan Mehri-1/+1
2025-09-08Remove support for register_attrWilfred Hughes-3/+3
This was removed in rustc in 2022: https://github.com/rust-lang/rust/pull/101123 Closes #20525.
2025-08-27Merge pull request #20527 from ChayimFriedman2/cache-next-solverShoyu Vanilla (Flint)-1/+8
perf: Cache trait solving across queries in the same revision
2025-08-25Merge pull request #20423 from ShoyuVanilla/import-2024Chayim Refael Friedman-37/+206
Make import sorting order follow 2024 edition style
2025-08-25Cache trait solving across queries in the same revisionChayim Refael Friedman-1/+8
Caching trait solving can do a lot to speed. Unfortunately it also consume a huge amount of memory. Therefore, as part of the migration to the new solver Jack Huey disabled caching of trait solving (he made the query transparent). The PR proposes a middle ground: do cache trait solving, but only for the same revision. This allows us to be safe because during a revision the inputs cannot change. The result is hopefully much better performance to features that tend to do a bulk of trait solving, and also repeat the same query (e.g. inference then IDE features). There is another limitation: results are only cached in the same thread, to remove the need for synchronization which will be expensive. More measurements are required to check whether it's better to use a synchronized global cache, or maybe stay with a thread-local cache but batch multiple feature requests (highlighting, inlay hints etc.) of the same file to the same thread. Alongside the actual cache we store the revision, because we need to verify it (we can't eagerly clear caches when incrementing the revision), and also the address of the db to prevent multiple dbs from interleaving (this is mostly relevant in tests, although injected highlighting also uses a new db, therefore maybe it's better to move it to a separate thread). This "games" analysis-stats to both be way faster and use way more memory; the former is because analysis-stats doesn't increment revisions, therefore all queries share the cache and hit ratio is way too good, the latter is because analysis-stats doesn't increment revisions and therefore the cache isn't cleared. Both are not representative of a typical IDE scenario.
2025-08-21Attach the DB in symbol queriesChayim Refael Friedman-12/+16
2025-08-17fix: Make lang items query properly filter out overwritten/excluded sysrootsShoyu Vanilla-5/+1
2025-08-13Merge Trait and TraitAlias handlingDeadbeef-23/+3
2025-08-12Merge pull request #20432 from ↵Chayim Refael Friedman-8/+53
sgasho/fix/20215_implement_default_member_to_resolve_ident_pat Fix "Implement default members" to resolve IdentPat
2025-08-12fix: Implement default member to resolve IdentPatsgasho-8/+53
2025-08-12Make import sorting order follow 2024 edition styleShoyu Vanilla-37/+206
2025-08-11Merge ref '21a19c297d4f' from rust-lang/rustThe rustc-josh-sync Cronjob Bot-14/+0
Pull recent changes from https://github.com/rust-lang/rust via Josh. Upstream ref: 21a19c297d4f5a03501d92ca251bd7a17073c08a Filtered ref: 9a5c1fb93028e1a29a7598ce782efb0c5d7be534 This merge was created using https://github.com/rust-lang/josh-sync.
2025-08-07Rollup merge of #144682 - nxsaken:strict_overflow_ops, r=Mark-SimulacrumStuart Cook-14/+0
Stabilize `strict_overflow_ops` Closes rust-lang/rust#118260
2025-08-04remvoe add_attr edit_in_place.rs because it use ted.Hmikihiro-1/+1
2025-08-04Remove strict_overflow_ops lintNurzhan Sakén-14/+0
2025-08-02When renaming a parameter to `self`, change callers to use method call syntaxChayim Refael Friedman-13/+6
2025-07-31`cargo clippy --fix`Lukas Wirth-206/+187
2025-07-26Migrate PathTransform to SyntaxEditorHayashi Mikihiro-35/+81
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-26add Debug on AstSubst PathTransform.rsHayashi Mikihiro-1/+2
Signed-off-by: Hayashi Mikihiro <34ttrweoewiwe28@gmail.com>
2025-07-20Fix search of raw labels and lifetimesChayim Refael Friedman-2/+7
It used to search for `'foo` which won't find `'r#foo`, now we search for `foo` instead.
2025-07-15Merge from rust-lang/rustLaurențiu Nicola-2/+2
2025-07-13update issue number for `const_trait_impl`Deadbeef-2/+2
2025-07-07Merge pull request #20185 from ChayimFriedman2/variant-symbolsDavid Barsky-0/+68
feat: Include enum variants in world symbols
2025-07-06Include enum variants in world symbolsChayim Refael Friedman-0/+68
I opted to not include enum variant imports, only under the enum, and to not gate this behind a setting.
2025-07-06Merge pull request #20132 from A4-Tacks/asmut-borrow-minicoreLukas Wirth-0/+12
Add AsMut, Borrow and BorrowMut to minicore and famous_defs
2025-07-03fix: Improve diagnostic ranges for `macro_calls!`Lukas Wirth-4/+4
We used to point to the entire macro call including its token tree if we couldn't upmap the diagnostic to the input This generally makes things very noisy as the entire macro call will turn red on errors. Instead, we now macro the path and `!` (bang) token as the error source range which is a lot nicer on the eyes.
2025-07-03Bump salsaLukas Wirth-1/+1
2025-07-01Add AsMut Borrow BorrowMut to minicore and famous_defsA4-Tacks-0/+12
2025-06-26Prettify AST in `PathTransform` if it's coming from a macroChayim Refael Friedman-4/+27
2025-06-23Don't run doctestsChayim Refael Friedman-0/+1
2025-06-17Merge pull request #20023 from Veykril/push-vkqlnyttnqzlLukas Wirth-1/+1
Improve completions in if / while expression conditions
2025-06-17Improve completions in if / while expression conditionsLukas Wirth-1/+1
2025-06-17chore: Start infesting ide crates with 'db lifetimeLukas Wirth-85/+96
2025-06-15Add config option to exclude imports from symbol searchLucas Holten-1/+182
2025-06-13`cargo upgrade`Lukas Wirth-1/+1
2025-06-09Merge from rust-lang/rustLaurențiu Nicola-14/+0
2025-06-05Stabilize `const_eq_ignore_ascii_case`Paolo Barbolini-14/+0
2025-06-02fix: Fix edition handling for names in rename logicLukas Wirth-80/+98
2025-06-02Enhance renaming to include identifiers that are generated from the original ↵Lukas Wirth-10/+18
symbol Co-authored-by: Jake Goulding <jake.goulding@integer32.com>
2025-05-30internal: Restructure some semantics APIs for virtual macro filesLukas Wirth-5/+9
2025-05-29fix: Fix import insertion not being fully cfg awareLukas Wirth-88/+169
2025-05-26Merge pull request #19864 from ChayimFriedman2/is-in-macroLukas Wirth-15/+19
fix: Properly implement `might_be_inside_macro_call()` using semantic information instead of syntactical hacks
2025-05-25Properly implement `might_be_inside_macro_call()` using semantic information ↵Chayim Refael Friedman-15/+19
instead of syntactical hacks And rename it to `is_inside_macro_call()` accordingly.