| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
- 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.
|
|
internal: Make `CfgExpr` slimmer
|
|
|
|
fix: Allow flyimport to import primitive shadowing modules
Fixes https://github.com/rust-lang/rust-analyzer/issues/16371
|
|
|
|
More `find_path` improvements
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
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.
|
|
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.
|
|
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
|
|
|
|
Add missing dyn parse special cases in 2015 edition
There were a few more special cases to consider here -> https://github.com/rust-lang/reference/pull/1538
|
|
|
|
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
|
|
|
|
minor: Fix some typos
|
|
|
|
feat: add inlay hint support for block expr with lifetime label

close https://github.com/rust-lang/rust-analyzer/issues/17582
|
|
|
|
label
|
|
|
|
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
|
|
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.
|
|
|
|
Parse contextual dyn keyword properly in edition 2015
Turns out this is more important than I thought it would be given the metrics :)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
perf: Reduce memory usage of salsa slots by 8 bytes
|
|
entries
|
|
|
|
internal: remove rust-analyzer.openFAQ
Removed no longer functional `rust-analyzer.openFAQ` command created in #17508
|
|
fix: handle synonymous imports with different renaming in 'merge imports'
fix #17602
|
|
|
|
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
|
|
|
|
|