Commit graph

30242 commits

Author SHA1 Message Date
David Barsky
b75301cec8 internal: refactor prefer_no_std/prefer_prelude bools into a struct 2024-05-22 20:46:30 +02:00
roife
d9cc159b26 fix: check pseudo-block by local_id instead of ModuleOrigin 2024-05-23 02:39:53 +08:00
bors
6a16749eb0 Auto merge of #17277 - Veykril:find-path-fixes, r=Veykril
fix: Various find path fixes

Fixes https://github.com/rust-lang/rust-analyzer/issues/17271
2024-05-22 18:22:32 +00:00
bors
42a8500ebf Auto merge of #17279 - Veykril:format_args-escape, r=Veykril
fix: Fix format_args lowering passing incorrect parameters to `rustc_parse_format`
2024-05-22 14:12:22 +00:00
Lukas Wirth
4f17d07e69 fix: Fix format_args lowering passing incorrect parameters to rustc_parse_format 2024-05-22 16:11:06 +02:00
bors
2dc22c658a Auto merge of #17248 - mladedav:dm/delay-clear, r=Veykril
Clear diagnostics only after new ones were received

Closes #15934

This adds a flag inside the global state which controls when old diagnostics are cleared. Now, old diagnostics should be cleared only after at least one new diagnostic is available.
2024-05-22 13:01:08 +00:00
bors
daf66ad8eb Auto merge of #17268 - Veykril:signatures, r=Veykril
feat: More callable info

With this PR we retain more info about callables other than functions, allowing for closure parameter type inlay hints to be linkable as well as better signature help around closures and `Fn*` implementors.
2024-05-22 12:48:17 +00:00
Lukas Wirth
760ad445e2 Update assists test fixtures 2024-05-22 14:46:33 +02:00
Lukas Wirth
ca06b090d7 expectify find_path tests 2024-05-22 14:05:24 +02:00
Lukas Wirth
c88b421853 fix: Fix general find-path inconsistencies 2024-05-22 14:05:24 +02:00
roife
48dc20f80d test: add tests for extern preludes resolving in local mods 2024-05-21 20:35:55 +08:00
bors
21ec8f5238 Auto merge of #17259 - lnicola:sync-from-rust, r=lnicola
internal: Sync from downstream
2024-05-19 08:28:03 +00:00
Laurențiu Nicola
5a12cfcee0 Bump rustc crates 2024-05-19 11:22:58 +03:00
Laurențiu Nicola
49cae17fa2 Merge from rust-lang/rust 2024-05-19 11:20:26 +03:00
Laurențiu Nicola
f9b54f8577 Preparing for merge from rust-lang/rust 2024-05-19 11:20:20 +03:00
bors
1a96534f34 Auto merge of #99969 - calebsander:feature/collect-box-str, r=dtolnay
alloc: implement FromIterator for Box<str>

`Box<[T]>` implements `FromIterator<T>` using `Vec<T>` + `into_boxed_slice()`.
Add analogous `FromIterator` implementations for `Box<str>`
matching the current implementations for `String`.
Remove the `Global` allocator requirement for `FromIterator<Box<str>>` too.

ACP: https://github.com/rust-lang/libs-team/issues/196
2024-05-19 02:13:06 +00:00
Lukas Wirth
7bd343e085 Show fn traits in signature info for trait implementors 2024-05-18 16:22:59 +02:00
Lukas Wirth
0de904d539 Enable linked locations for closure param inlay hints 2024-05-18 15:06:46 +02:00
Lukas Wirth
ff79903cf6 Render closure fn trait kind in siganture help 2024-05-18 15:01:37 +02:00
bors
694417aaa6 Auto merge of #124611 - Urgau:rustdoc-stdin, r=GuillaumeGomez
Add `-` (stdin) support in rustdoc

This PR adds support for the special `-` input which threats the input as coming from *stdin* instead of being a filepath.

Doing this also makes `rustdoc` consistent with `rustc` and ~~every~~ other tools. Full [motivation](https://github.com/rust-lang/rust/pull/124611#issuecomment-2094234876).

Fixes https://github.com/rust-lang/rust/issues/123671
r? `@fmease`
2024-05-18 10:53:47 +00:00
Lukas Wirth
7c6f31a45b Allow hir::Param to refer to other entity params aside from functions 2024-05-18 12:35:55 +02:00
Lukas Wirth
cd9e90cc71 Update builtin tool list 2024-05-18 10:52:05 +02:00
bors
d8035f3434 Auto merge of #125105 - nnethercote:rustc_resolve-cleanups, r=estebank
`rustc_resolve` cleanups

Some improvements I found while looking through this code.

r? `@estebank`
2024-05-18 06:36:44 +00:00
bors
6524922b1b Auto merge of #17250 - adaszko:patch-1, r=lnicola
Correct Neovim 0.10 inlay hints config example

This change is what I had to do to make inlay hints work on Neovim 0.10.  The current example produces errors about wrong argument type to `.enable()`.
2024-05-18 05:37:17 +00:00
Luuk Wester
537b4c6305 implement assist to switch between doc and normal comments 2024-05-18 02:38:41 +02:00
roife
55db9530eb fix: resolve extern prelude for local mods in block modules 2024-05-17 23:29:00 +08:00
Adam Szkoda
2cc2521996
Correct Neovim 0.10 inlay hints config example 2024-05-17 12:42:17 +02:00
David Mládek
4d9346922a Clear diagnostics only after new ones were received 2024-05-17 01:30:01 +02:00
bors
e9fc5f579e Auto merge of #124728 - beetrees:from-f16-for-f64, r=BurntSushi
Re-add `From<f16> for f64`

This impl was originally added in #122470 before being removed in #123830 due to #123831. However, the issue only affects `f32` (which currently only has one `From<{float}>` impl, `From<f32>`) as `f64` already has two `From<{float}>` impls (`From<f32>` and `From<f64>`) and is also the float literal fallback type anyway. Therefore it is safe to re-add `From<f16> for f64`.

This PR also updates the FIXME link to point to the open issue #123831 rather than the closed issue #123824.

Tracking issue: #116909

`@rustbot` label +F-f16_and_f128 +T-libs-api
2024-05-16 16:48:58 +00:00
bors
078395a6b2 Auto merge of #124959 - prorealize:update-result-documentation, r=joboet
Refactor examples and enhance documentation in result.rs

- Replaced `map` with `map_err` in the error handling example for correctness
- Reordered example code to improve readability and logical flow
- Added assertions to examples to demonstrate expected outcomes
2024-05-16 12:21:12 +00:00
bors
83ba420431 Auto merge of #17243 - Veykril:static-lt-hir, r=Veykril
internal: Add StaticLifetime to hir API
2024-05-16 06:04:52 +00:00
Lukas Wirth
aaa5426fec internal: Add StaticLifetime to hir API 2024-05-16 08:02:51 +02:00
bors
b5626032bd Auto merge of #17241 - blyxyas:fix-typos, r=lnicola
Chore: Fix some typos

https://github.com/rust-lang/rust/pull/124948

> In RA we gladly take typo fixes, but for now we definitely want them in the upstream repository.
2024-05-15 17:00:46 +00:00
blyxyas
66f62836ae Fix typos 2024-05-15 18:55:27 +02:00
bors
d922999ec6 Auto merge of #17240 - Veykril:metrics-caching-fix, r=Veykril
Use actions/cache again in metrics CI

The other one overwrites the target cache again which we don't want
2024-05-15 13:27:20 +00:00
Lukas Wirth
abb3ed5db6 Use actions/cache again in metrics CI 2024-05-15 15:25:58 +02:00
bors
9bc68735aa Auto merge of #17239 - Veykril:metrics-caching, r=Veykril
internal: Key ignoring the job-id in metrics cache
2024-05-15 11:32:48 +00:00
Lukas Wirth
7d5fc43645 Key ignoring the job-id in metrics cache 2024-05-15 13:31:11 +02:00
bors
8772b865c9 Auto merge of #17238 - Veykril:metrics-caching, r=Veykril
Fix metrics workflow not actually updating the toolchain

The install won't persist across jobs
2024-05-15 10:57:26 +00:00
Lukas Wirth
aab1bd1a83 Fix metrics workflow not actually updating the toolchain 2024-05-15 12:54:24 +02:00
bors
6095cbf14d Auto merge of #17235 - Veykril:metrics-caching, r=Veykril
internal: Use Swatinem/rust-cache for metrics CI

Current metrics caching uses a base cache action, whereas I think the one we use for general ci works here as well. Saw this while noticing that our metrics CI is broken as it for some reason uses an outdated rust stable? (unsure why that is)
2024-05-15 09:36:33 +00:00
Lukas Wirth
2689867ee5 Bump Swatinem/rust-cache 2024-05-15 09:50:34 +02:00
Lukas Wirth
31aba7ac3c Use Swatinem/rust-cache for metrics CI 2024-05-15 09:49:42 +02:00
bors
c0732c9f0f Auto merge of #17232 - Veykril:build-scripts-keep-going, r=Veykril
fix: Don't emit --keep-going for custom build script commands

Might be the cause for https://github.com/rust-lang/rust-analyzer/issues/17231
2024-05-14 19:28:22 +00:00
Lukas Wirth
eac2e512a1 fix: Don't emit --keep-going for custom build script commands 2024-05-14 21:26:37 +02:00
bors
07d71c05c3 Auto merge of #17216 - Young-Flash:mod_with_path, r=Veykril
fix: extract mod to file should respect path attribute

close https://github.com/rust-lang/rust-analyzer/issues/17181
2024-05-14 14:29:00 +00:00
bors
77c7886283 Auto merge of #17227 - Veykril:build-deps-changed-hashes, r=Veykril
fix: Hash file contents to verify whether file actually changed

Fixes https://github.com/rust-lang/rust-analyzer/issues/16580
2024-05-14 10:48:18 +00:00
bors
52135cb510 Auto merge of #17228 - Veykril:stable-runnables-order, r=Veykril
internal: Sort computed runnables

Fixes https://github.com/rust-lang/rust-analyzer/issues/17223
2024-05-14 10:35:10 +00:00
Lukas Wirth
465ebbc102 internal: Sort computed runnables 2024-05-14 12:32:48 +02:00
Lukas Wirth
1ca97ba896 Hash file contents to verify whether file actually changed 2024-05-14 11:55:12 +02:00