| Age | Commit message (Collapse) | Author | Lines |
|
10199: fix: Fix Cargo.toml change detection r=lnicola a=lnicola
Maybe fixes #9546
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
|
|
|
|
|
|
|
|
|
|
|
|
The generated code with `()` doesn't compile in most of the cases. To signal
the developer there's something to do, fill in `todo!()`.
Because the file *missing_fields.rs* contains the string `todo!()` it needs
an exception for the test *check_todo*.
|
|
|
|
|
|
10147: fix: don't panic if the client sends invalid request r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
|
|
|
|
|
|
|
|
|
|
tt is a data structure, data structures cant' go wrong, they shouldn't
have the knowledge that the world outside of them has all kinds of
errors.
|
|
When dealing with proc macros, there are two very different kinds of
errors:
* first, usual errors of "proc macro panicked on this particular input"
* second, the proc macro server might day if the user, eg, kills it
First kind of errors are expected and are a normal output, while the
second kind are genuine IO-errors.
For this reason, we use a curious nested result here: `Result<Result<T,
E1>, E2>` pattern, which is 100% inspired by http://sled.rs/errors.html
|
|
naming, layout & comments help!
|
|
|
|
closes #9922
Turned out to be trivial after preliminary refactor.
The intended behavior is that we schedule cache priming once ws become
quiescent (that is, we fully load cargo project), and we continue to
rschedule it until it completes (priming might get cancelled by user
typing into a file).
|
|
There should be only one place where we need to check if we want to
start background activities.
|
|
Let's have only one place where we start delayed ops
|
|
It doesn't make sense for the prime_caches itself send begin/end events
-- the caller knows perfectly fine when they happen!
|
|
10005: Extend `CargoConfig.unset_test_crates` r=matklad a=regexident
This is to allow for efficiently disabling `#[cfg(test)]` on all crates (by passing `unset_test_crates: UnsetTestCrates::All`) without having to first load the crate graph, when using rust-analyzer as a library.
(FYI: The change doesn't seem to be covered by any existing tests.)
Co-authored-by: Vincent Esche <regexident@gmail.com>
|
|
10080: internal: don't shut up the compiler when it says the code's buggy r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
|
|
Wrapping state-modifying functions into a `catch_unwind` is wrong -- to
do retry after failure, you need to have transactional semantics!
|
|
10079: internal: make upstream bug less annoying r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
|
|
|
|
|
|
Thanks https://internals.rust-lang.org/t/feature-idea-edition-dependent-names-replacing-standard-library-items/15198/27?u=matklad!
|
|
`#[cfg(test)]` on all crates without having to first load the crate graph
|
|
|
|
|
|
9993: feat: join lines merges assignments r=matklad a=unexge
Closes https://github.com/rust-analyzer/rust-analyzer/issues/9967.

Co-authored-by: unexge <unexge@gmail.com>
|
|
Ideally, we should just return an InvalidParameter dialog here, but that
shows error message to the end user, and we generally avoid that
|
|
|
|
It's good that rust-analyzer doesn't belly-up on a panic in some random
assist.
It is less good that rust-analyzer devs only know that the assists are
buggy when they are actively looking at the logs.
|
|
Proc macro expansion shouldn't know about salsa at all.
|
|
I don't think there's anything wrong with project_model depending on
proc_macro_api directly -- fundamentally, both are about gluing our pure
data model to the messy outside world.
However, it's easy enough to avoid the dependency, so why not.
As an additional consideration, `proc_macro_api` now pulls in `base_db`.
project_model should definitely not depend on that!
|
|
|
|
cargo llvm-lines shows that path_to_error bloats the code. I don't think
I've needed this functionality recently, seems that we've fixed most of
the serialization problems. So let's just remove it. Should be easy to
add back if we ever need it, and it does make sense to keep the
`from_json` function around.
|
|
|
|
|
|
- Fix some warnings
|
|
|
|
9841: internal: print total size of source code in analysis-stats r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
|
|
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
|
|
|
|
9830: Enable more assists to generate default trait body impls r=Veykril a=yoshuawuyts
Enable more assists to benefit from trait body generation. Follow-up to #9825 and #9814.
__edit:__ I'd like to move the existing tests to this new file too, but I'll do that in a follow-up PR.
Co-authored-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
|
|
|
|
|