about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
AgeCommit message (Collapse)AuthorLines
2024-07-23rename config::ConfigChange::other_errors to validation_errorsAli Bektas-6/+5
2024-07-22Add FIXME to root ratoml tests.Ali Bektas-9/+8
2024-07-22Apply changes to ratoml/fixesAli Bektas-5/+9
2024-07-22Minor fixes for ratoml moduleAli Bektas-115/+90
- Parse errors are reflected as such by defining a new variant called `ConfigError::ParseError` - New error collection has been added to store config level agnostic errors.
2024-07-21Auto merge of #17657 - Veykril:cfg-slim, r=lnicolabors-64/+77
internal: Make `CfgExpr` slimmer
2024-07-21Make `CfgExpr` slimmerLukas Wirth-64/+77
2024-07-21Auto merge of #17656 - Veykril:flyimport-builtin-mod, r=Veykrilbors-2/+28
fix: Allow flyimport to import primitive shadowing modules Fixes https://github.com/rust-lang/rust-analyzer/issues/16371
2024-07-21fix: Allow flyimport to import primitive shadowing modulesLukas Wirth-2/+28
2024-07-21Auto merge of #17655 - Veykril:std-find-path, r=Veykrilbors-224/+320
More `find_path` improvements
2024-07-21Optimize `find_path` for sysroot library search some moreLukas Wirth-98/+112
2024-07-21Fix visited module tracking not clearing itself on backtrackingLukas Wirth-46/+86
2024-07-21Use out parameter instead of return value for `find_path` choiceLukas Wirth-56/+53
2024-07-21Fix using wrong length for max_len argLukas Wirth-2/+7
2024-07-21Specialize `find_path` local searchLukas Wirth-28/+45
2024-07-21Optimize `find_path` choice selectionLukas Wirth-122/+145
2024-07-21Auto merge of #17653 - Veykril:std-find-path, r=Veykrilbors-6/+69
Prefer standard library paths over shorter extern deps re-exports This should generally speed up path finding for std items as we no longer bother looking through all external dependencies. It also makes more sense to prefer importing std items from the std dependencies directly. Fixes https://github.com/rust-lang/rust-analyzer/issues/17540
2024-07-21Prefer standard library paths over shorter extern deps re-exportsLukas Wirth-6/+69
2024-07-21Auto merge of #17650 - ObsidianMinor:fix/17645, r=Veykrilbors-5/+47
Fix path resolution for child mods of those expanded by `include!` Child modules wouldn't use the correct candidate paths due to a branch that doesn't seem to be doing what it's intended to do. Removing the branch fixes the problem and all existing test cases pass. Having no knowledge of how any of this works, I believe this fixes #17645. Using another test that writes the included mod directly into `lib.rs` instead, I found the difference can be traced to the candidate files we use to look up mods. A separate branch for if the file comes from an `include!` macro doesn't take into account the original mod we're contained within: ```rust None if file_id.macro_file().map_or(false, |it| it.is_include_macro(db.upcast())) => { candidate_files.push(format!("{}.rs", name.display(db.upcast()))); candidate_files.push(format!("{}/mod.rs", name.display(db.upcast()))); } ``` I'm not sure why this branch exists. Tracing the branch back takes us to 3bb9efb but it doesn't say *why* the branch was added. The test case that was added in this commit passes with the branch removed, so I think it's just superfluous at this point.
2024-07-20Fix path resolution for child mods of those expanded by `include!`Sydney Acksman-5/+47
Child modules wouldn't use the correct candidate paths due to a branch that doesn't seem to be doing what it's intended to do. Removing the branch fixes the problem and all existing test cases pass.
2024-07-20Auto merge of #17649 - ShoyuVanilla:issue-17585, r=Veykrilbors-0/+21
fix: Panic in debug profile for tuple deconstruct with arity mismatch Fixes #17585, which doesn't affect daily use cases but quite annoying in development of r-a itself like writing tests. This PR applies similar approach as in #17534, skipping match usefulness check for patterns containing errors
2024-07-21fix: Panic in debug profile for tuple deconstruct with arity mismatchShoyu Vanilla-0/+21
2024-07-20Add missing dyn parse special cases in 2015 editionLukas Wirth-70/+162
2024-07-20Auto merge of #17641 - nyurik:optimize-refs, r=Veykrilbors-12/+12
Avoid ref when using format! in compiler Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse. See https://github.com/rust-lang/rust-clippy/issues/10851
2024-07-20Keep references in format! when the target is unsizedLukas Wirth-1/+1
2024-07-20Fix some typosLaurențiu Nicola-3/+2
2024-07-20minor: tweak commentYoung-Flash-1/+2
2024-07-20internal: add test case for inlay hint support for block expr with lifetime ↵Young-Flash-0/+23
label
2024-07-20feat: add inlay hint support for block expr with lifetime labelYoung-Flash-1/+8
2024-07-19Auto merge of #17639 - Veykril:salsa-perf, r=Veykrilbors-403/+1241
Some more small salsa memory improvements This does limit our lru limits to 2^16 but if you want to set them higher than that you might as well not set them at all. Also makes `LRU` opt-in per query now, allowing us to drop all the unnecessary LRU stuff for most queries
2024-07-19Avoid ref when using format! in compilerYuri Astrakhan-13/+13
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse.
2024-07-19Add back equality check that went missingLukas Wirth-1/+8
2024-07-19Fix edition used for include macro parsingLukas Wirth-13/+17
2024-07-19Parse contextual dyn keyword properly in edition 2015Lukas Wirth-11/+164
2024-07-19Drop an unnecessary `Arc::clone`Lukas Wirth-1/+1
2024-07-19Regenerate filesLukas Wirth-2/+8
2024-07-19Make LRU opt-inLukas Wirth-342/+1159
2024-07-19Remove duplicate information from interned::SlotLukas Wirth-11/+18
2024-07-19Auto merge of #17638 - Veykril:salsa-perf, r=Veykrilbors-35/+28
perf: Reduce memory usage of salsa slots by 8 bytes
2024-07-19Reduce maximum LRU size to 2^16 entries, reducing memory footprint of LRU ↵Lukas Wirth-49/+50
entries
2024-07-19perf: Reduce memory usage of salsa slots by 8 bytesLukas Wirth-35/+28
2024-07-19Auto merge of #17637 - jjoeldaniel:master, r=Veykrilbors-14/+0
internal: remove rust-analyzer.openFAQ Removed no longer functional `rust-analyzer.openFAQ` command created in #17508
2024-07-19Auto merge of #17622 - roife:fix-issue-17602, r=Veykrilbors-5/+82
fix: handle synonymous imports with different renaming in 'merge imports' fix #17602
2024-07-19remove rust-analyzer.openFAQJoel Daniel Rico-19/+0
2024-07-19Auto merge of #17620 - Veykril:edition-aware-parser, r=Veykrilbors-1425/+2642
Edition aware parser Fixes https://github.com/rust-lang/rust-analyzer/issues/16324 by allowing us to properly thread through the edition to the parser
2024-07-19Test macros doing edition dependent parsingLukas Wirth-62/+92
2024-07-19Prevent generated runner module from being format checkedLukas Wirth-0/+1
2024-07-19Parse `try` as a keyword only in edition 2018 and upLukas Wirth-42/+24
2024-07-19Add basic edition inline parser test supportLukas Wirth-172/+185
2024-07-19Make xtask install work againLaurențiu Nicola-2/+2
2024-07-18Auto merge of #17246 - ↵bors-169/+877
davidbarsky:david/move-rust-project-generation-to-server, r=Veykril feature: teach rust-analyzer to discover `linked_projects` This PR's been a long-time coming, but like the title says, it introduces server-side project discovery and removes the extension hooks I previously introduced. I don't think this PR is ready to land, but here are the things I'm feeling squishy about: - I don't think I like the idea of introducing the `cargo-metadata` command-but-for-everything-else in the `flycheck` module, but the progress reporting infrastructure was too convenient to pass up. Happy to move it elsewhere. Here are the things I _know_ I need to change: - For progress reporting, I'm extracting from a `serde_json::Value` that corresponds to `tracing_subsciber::fmt::Layer`'s JSON output. I'd like to make this a bit more structured/documented than the current nonsense I wrote. - The progress reporting currently hardcodes "Buck"; it should be deriving that from the previously mentioned more-structured-output. - This doesn't handle *reloading* when a corresponding buildfile is changed. It should be doing that. <details> <summary>Anyway, here's a video of rust-analyzer discovering a Buck target.</summary> https://github.com/rust-lang/rust-analyzer/assets/2067774/be6cd9b9-2c9a-402d-847f-05f860a91df1 </details>