Commit Graph

269751 Commits

Author SHA1 Message Date
Matthias Krüger
83085b99c2
Rollup merge of #131732 - m4tx:fix-82824, r=davidtwco
Add doc(plugins), doc(passes), etc. to INVALID_DOC_ATTRIBUTES

This fixes #82824.
2024-10-22 15:28:45 +02:00
Matthias Krüger
cbb85f1bd5
Rollup merge of #131731 - lucarlig:master, r=onur-ozkan
add `TestFloatParse` to `tools.rs` for bootstrap

add TestFloatParse to tools for bootstrap, I am not sure this is what the issue https://github.com/rust-lang/rust/issues/128012 discussion wants.

try-job: aarch64-apple
2024-10-22 15:28:43 +02:00
Matthias Krüger
457087ed29
Rollup merge of #131549 - compiler-errors:try-in-sync, r=spastorino
Add a note for `?` on a `impl Future<Output = Result<..>>` in sync function

It's confusing to `?` a future of a result in a sync function. We have a suggestion to `.await` it if we're in an async function, but not a sync function. Note that this is the case for sync functions, at least.

Let's be a bit more vague about a fix, since it's somewhat context dependent. For example, you could block on it, or you could make your function asynchronous. 🤷
2024-10-22 15:28:41 +02:00
Matthias Krüger
3f15d296f4
Rollup merge of #131049 - compiler-errors:more-validation, r=spastorino
Validate args are correct for `UnevaluatedConst`, `ExistentialTraitRef`/`ExistentialProjection`

For the `Existential*` ones, we have to do some adjustment to the args list to deal with the missing `Self` type, so we introduce a `debug_assert_existential_args_compatible` function to the interner as well.
2024-10-22 15:28:38 +02:00
Matthias Krüger
4d378f26a9
Rollup merge of #125205 - ChrisDenton:verbatim-include, r=jieyouxu
Fixup Windows verbatim paths when used with the `include!` macro

On Windows, the following code can fail if the `OUT_DIR` environment variable is a [verbatim path](https://doc.rust-lang.org/std/path/enum.Prefix.html) (i.e. begins with `\\?\`):

```rust
include!(concat!(env!("OUT_DIR"), "/src/repro.rs"));
```

This is because verbatim paths treat `/` literally, as if it were just another character in the file name.

The good news is that the standard library already has code to fix this. We can simply use `components` to normalize the path so it works as intended.
2024-10-22 15:28:35 +02:00
Marco Ieni
548224782c
Merge pull request #18372 from Kobzol/ci-merge-queue
Switch CI from bors to merge queues
2024-10-22 12:57:57 +00:00
Adrian Taylor
8f85b90ca6 Rename Receiver -> LegacyReceiver
As part of the "arbitrary self types v2" project, we are going to
replace the current `Receiver` trait with a new mechanism based on a
new, different `Receiver` trait.

This PR renames the old trait to get it out the way. Naming is hard.
Options considered included:
* HardCodedReceiver (because it should only be used for things in the
  standard library, and hence is sort-of hard coded)
* LegacyReceiver
* TargetLessReceiver
* OldReceiver

These are all bad names, but fortunately this will be temporary.
Assuming the new mechanism proceeds to stabilization as intended, the
legacy trait will be removed altogether.

Although we expect this trait to be used only in the standard library,
we suspect it may be in use elsehwere, so we're landing this change
separately to identify any surprising breakages.

It's known that this trait is used within the Rust for Linux project; a
patch is in progress to remove their dependency.

This is a part of the arbitrary self types v2 project,
https://github.com/rust-lang/rfcs/pull/3519
https://github.com/rust-lang/rust/issues/44874

r? @wesleywiser
2024-10-22 12:55:16 +00:00
bors
408f924758 Auto merge of #18370 - duncpro:goto-def-ranges, r=Veykril
feat: resolve range patterns to their structs

Closes #18367
2024-10-22 12:24:25 +00:00
bors
7cad4da1ab Auto merge of #18368 - Veykril:test-lsif_contains_generated_macros, r=lnicola
tests: Add `lsif_contains_generated_constant` test

Closes https://github.com/rust-lang/rust-analyzer/pull/18309
2024-10-22 12:10:07 +00:00
Jakub Beránek
7c315cfbe6 Switch CI from bors to merge queues 2024-10-22 14:04:24 +02:00
bors
0b906b6e3d Auto merge of #18349 - dqkqd:issue-18344, r=Veykril
feat: render docs from aliased type when type has no docs

Trying to close #18344

- [x] ~Find the docs by traversing upwards if the type itself has none but aliasing for another type that might have.~
- [x] Show docs from aliased type.
- [x] Showing description that we are displaying documentation for different definition in hover box.

![image](https://github.com/user-attachments/assets/820d6f97-aa2c-4dc4-8a25-75746e32d950)
2024-10-22 11:56:16 +00:00
许杰友 Jieyou Xu (Joe)
03c7f992cd ci: switch x86_64-gnu-debug to use a large disk runner
Full stage 2 build + run-make with full debug info seems to overwhelm
the standard 4c runner's storage capacity.
2024-10-22 19:44:30 +08:00
许杰友 Jieyou Xu (Joe)
0ccc62a5dc ci: run the full run-make test suite
Instead of filtering `run-make` tests whose test names contain the
`clang` substring.
2024-10-22 19:43:22 +08:00
许杰友 Jieyou Xu (Joe)
e641b6c2bd tests/run-make: port issue-84395-lto-embed-bitcode to rmake.rs
Co-authored-by: Oneirical <manchot@videotron.ca>
2024-10-22 19:43:22 +08:00
许杰友 Jieyou Xu (Joe)
ef743af119 run-make-support: add llvm-dis and llvm-objcopy 2024-10-22 19:43:22 +08:00
许杰友 Jieyou Xu (Joe)
562d08ee27 tests/run-make: fix cross-lang-lto-riscv-abi 2024-10-22 19:43:22 +08:00
许杰友 Jieyou Xu (Joe)
921e2f8f66 run_make_support: allow obtaining raw stdout/stderr
And match `stdout/stderr` lossy UTF-8 helpers.
2024-10-22 19:43:22 +08:00
bors
919ba41fee Auto merge of #18371 - Veykril:veykril/push-kwttrusywysp, r=Veykril
fix: Fix incorrect parsing of use bounds

Fixes https://github.com/rust-lang/rust-analyzer/issues/18357
2024-10-22 11:42:11 +00:00
Lukas Wirth
6f71369428 fix: Fix incorrect parsing of use bounds
Also lower them a bit more
2024-10-22 13:34:26 +02:00
Khanh Duong Quoc
b70feec206
feat: render docs from aliased type when docs are missing 2024-10-22 20:27:05 +09:00
Ralf Jung
09068192f8 adjust asm test 2024-10-22 12:21:00 +01:00
Marco Ieni
340d2f7847
Merge pull request #3981 from Kobzol/ci-merge-queue
Switch CI to merge queues
2024-10-22 11:03:36 +00:00
bors
bca5fdebe0 Auto merge of #131321 - RalfJung:feature-activation, r=nnethercote
terminology: #[feature] *enables* a feature (instead of "declaring" or "activating" it)

Mostly, we currently call a feature that has a corresponding `#[feature(name)]` attribute in the current crate a "declared" feature. I think that is confusing as it does not align with what "declaring" usually means. Furthermore, we *also* refer to `#[stable]`/`#[unstable]` as *declaring* a feature (e.g. in [these diagnostics](f25e5abea2/compiler/rustc_passes/messages.ftl (L297-L301))), which aligns better with what "declaring" usually means. To make things worse, the functions  `tcx.features().active(...)` and  `tcx.features().declared(...)` both exist and they are doing almost the same thing (testing whether a corresponding `#[feature(name)]`  exists) except that `active` would ICE if the feature is not an unstable lang feature. On top of this, the callback when a feature is activated/declared is called `set_enabled`, and many comments also talk about "enabling" a feature.

So really, our terminology is just a mess.

I would suggest we use "declaring a feature" for saying that something is/was guarded by a feature (e.g. `#[stable]`/`#[unstable]`), and "enabling a feature" for  `#[feature(name)]`. This PR implements that.
2024-10-22 11:02:35 +00:00
Duncan Proctor
273d9d74f9 tidy 2024-10-22 06:54:44 -04:00
Zalathar
997b7a6ed0 Make line_directive return a DirectiveLine
This reduces the need to juggle raw tuples, and opens up the possibility of
moving more parts of directive parsing into `line_directive`.
2024-10-22 21:47:51 +11:00
Zalathar
c4016ea455 Rename some fields of DirectiveLine 2024-10-22 21:47:51 +11:00
Jakub Beránek
615822d0da
Switch CI to merge queues 2024-10-22 12:38:10 +02:00
Duncan Proctor
734710ff44 tidy 2024-10-22 06:37:12 -04:00
Zalathar
1467deea64 Stop using line_directive in runtest::debugger
This also removes unused support for `[rev]` in debugger commands, and makes
breakpoint detection slightly more sensible.
2024-10-22 21:29:08 +11:00
Duncan Proctor
b181cac478 remove duplicate test 2024-10-22 06:25:13 -04:00
Duncan Proctor
21636ac046 resolve range patterns to the their struct types 2024-10-22 06:20:16 -04:00
bors
d4742e7158 Auto merge of #18366 - Veykril:veykril/push-uvwvwzxnkmnz, r=Veykril
Fix status bar message not being marked markdown

Closes https://github.com/rust-lang/rust-analyzer/pull/18323
2024-10-22 09:50:00 +00:00
Lukas Wirth
76368b805d Fix new nightly lints 2024-10-22 11:48:41 +02:00
Zalathar
7f4dd9bb81 Move cmp_in_dominator_order out of graph dominator computation
Dominator-order information is only needed for coverage graphs, and is easy
enough to collect by just traversing the graph again.

This avoids wasted work when computing graph dominators for any other purpose.
2024-10-22 20:44:09 +11:00
Johann Hemmann
ec4b9e0901 tests: Add lsif_contains_generated_constant test 2024-10-22 11:38:54 +02:00
Slanterns
0a963ab2da
refactor Arc<T>::default 2024-10-22 02:25:48 -07:00
Slanterns
7782401c52
add codegen test 2024-10-22 02:25:38 -07:00
Lukas Wirth
5e3561ea06 Cleanup file structure proto handling 2024-10-22 10:51:08 +02:00
Lukas Wirth
3e02349076 Fix status bar messagen not being marked markdown 2024-10-22 10:51:04 +02:00
Slanterns
5b12d906bb
optimize Rc<T>::default 2024-10-22 01:37:53 -07:00
bors
916e9ced40 Auto merge of #132030 - matthiaskrgr:rollup-1g6quh0, r=matthiaskrgr
Rollup of 3 pull requests

Successful merges:

 - #131918 (coverage: Make counter creation handle node/edge counters more uniformly)
 - #132021 (nuttx.md: typo)
 - #132029 (Subtree update of `rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-22 08:34:18 +00:00
bors
f8448f9e0c Auto merge of #3982 - RalfJung:epoll_ctl, r=RalfJung
epoll_ctl: throw unsupported error on unsupported opcode

`@tiif` this is a somewhat suspicious "return -1" without setting the `errno` -- what is the reasoning behind that?

Throwing a clear error seems better to me.
2024-10-22 08:21:37 +00:00
Matthias Krüger
6e7fcb2a60
Rollup merge of #132029 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2024-10-22 10:08:47 +02:00
Matthias Krüger
31a9d741ec
Rollup merge of #132021 - tshepang:patch-2, r=workingjubilee
nuttx.md: typo
2024-10-22 10:08:46 +02:00
Matthias Krüger
703b042be8
Rollup merge of #131918 - Zalathar:counters, r=nnethercote
coverage: Make counter creation handle node/edge counters more uniformly

Similar to #130380, this is another round of small improvements informed by my ongoing attempts to overhaul coverage counter creation.

One of the big benefits is getting rid of the awkward special-case that would sometimes attach an edge counter to a node instead. That was needed by the code that chooses which out-edge should be given a counter expression, but we can avoid that by making the corresponding check a little smarter.

I've also renamed several things to be simpler and more consistent, which should help with future changes.
2024-10-22 10:08:46 +02:00
bors
5087af2bf5 Auto merge of #18362 - duncpro:goto-def-ranges, r=Veykril
feat: goto definition on range operators

Closes #18342
2024-10-22 07:49:18 +00:00
bors
ca51c1e72c Auto merge of #18364 - lnicola:sync-from-rust, r=lnicola
minor: sync from downstream
2024-10-22 07:21:22 +00:00
Duncan Proctor
b763913329 tidy 2024-10-22 03:19:47 -04:00
Laurențiu Nicola
efc2ba2d90 Replace some LayoutError variants with the rustc_abi errors 2024-10-22 10:19:25 +03:00
Laurențiu Nicola
420b665c60 Bump rustc crates 2024-10-22 10:12:46 +03:00