Fix#8417. Also makes it less noisy about no_mangle annotated stuff the
user can do nothing about.
Note: this still is broken with bitfield! macros. A repro in an ignore
test is included here. I believe this bug is elsewhere, and I don't
think I can work around it here.
8408: Update `OUT_DIR` diagnostic to match setting r=jonas-schievink a=jonas-schievink
The setting was renamed, so the diagnostic should follow
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
I'd prefer getting rid of it, but it's used in the impl search and not
super easy to replace there (I think ideally the impl search would do
proper unification, but that's a bit more complicated).
8402: Remove Ty::substs{_mut} r=flodiebold a=flodiebold
Almost all uses actually only care about ADT substs, so it's better to be explicit. The methods were a bad abstraction anyway since they already didn't include the inner types of e.g. `TyKind::Ref` anymore.
Co-authored-by: Florian Diebold <flodiebold@gmail.com>
Almost all uses actually only care about ADT substs, so it's better to
be explicit. The methods were a bad abstraction anyway since they
already didn't include the inner types of e.g. `TyKind::Ref` anymore.
8397: Return proper error code when server is loading r=matklad a=ceronman
When requests are made to rust-analyzer and the server is still loading, a response error is returned with the code `ContentModified` and text `"Rust Analyzer is still loading..."`. This error code doesn't seem to be the more appropriate for this situation. Using `ServerNotInitialized` seems better.
As this is such a small change, I have not created an issue for it.
Co-authored-by: Manuel Ceron <manuel.ceron@jetbrains.com>
8386: Avoid O(n²) when constructing AttrSourceMap r=jonas-schievink a=jonas-schievink
Brings https://github.com/rust-analyzer/rust-analyzer/issues/8377 down to 2.52s on my machine. Not quite back to where it was before, so I'll leave that issue open for now.
bors r+
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
8371: Don't use HirDisplayWrapper when displaying SourceCode r=matklad a=Veykril
The issue was basically that when displaying for `DisplayTarget::SourceCode` some `hir_fmt` functions would create `HirDisplayWrapper`s which would then `fmt` these triggering the Display panic since `fmt::Display` can't fail the same way as `HirDisplay`. Simple fix is to just use `hir_fmt` directly. Should probably write that down somewhere in source, looking for a good spot to put that right now.
Fixes#8077, Fixes#8370
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
8375: feat: show errors from `cargo metadata` and initial `cargo check` in the status bar r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>