许杰友 Jieyou Xu (Joe)
505ab3885b
Rollup merge of #134474 - oli-obk:push-yomnkntvzlxw, r=compiler-errors
...
Forbid overwriting types in typeck
While trying to figure out some type setting logic in https://github.com/rust-lang/rust/pull/134248 I realized that we sometimes set a type twice. While hopefully that would have been the same type, we didn't ensure that at all and just silently accepted it. So now we reject setting it twice, unless errors are happening, then we don't care.
Best reviewed commit by commit.
No behaviour change is intended.
2024-12-19 16:48:10 +08:00
许杰友 Jieyou Xu (Joe)
5305b0255b
Rollup merge of #134437 - onur-ozkan:improve-compiler-build, r=jieyouxu
...
reduce compiler `Assemble` complexity
`compile::Assemble` is already complicated by its nature (as it handles core internals like recursive building logic, etc.) and also handles half of `LldWrapper` tool logic for no good reason since it should be done in the build step directly.
This change moves it there to reduce complexity of `compile::Assemble` logic.
2024-12-19 16:48:09 +08:00
许杰友 Jieyou Xu (Joe)
4f1eabf1b1
Rollup merge of #134432 - GuillaumeGomez:intra-doc-in-footnotes, r=notriddle
...
Fix intra doc links not generated inside footnote definitions
Fixes #132208 .
The problem was that we were running the `Footnote` "pass" before the `LinkReplacer` one. Sadly, the change is bigger than it should because we can't specialize the `Iterator` trait implementation, forcing me to add a new type to handle the other `Iterator` kind (the one which still has the `Range`).
r? ``@notriddle``
2024-12-19 16:48:09 +08:00
许杰友 Jieyou Xu (Joe)
d40e2a59a1
Rollup merge of #134427 - MarcoIeni:ci-remove-code-duplication, r=Kobzol
...
ci: remove duplicate task definition
try-job: x86_64-gnu-llvm-19-1
try-job: x86_64-gnu-llvm-19-2
try-job: x86_64-gnu-llvm-19-3
try-job: x86_64-gnu-llvm-18-1
try-job: x86_64-gnu-llvm-18-2
try-job: x86_64-gnu-llvm-18-3
try-job: i686-gnu-1
try-job: i686-gnu-2
try-job: i686-gnu-nopt-1
try-job: i686-gnu-nopt-2
2024-12-19 16:48:08 +08:00
许杰友 Jieyou Xu (Joe)
e95b48b6d9
Rollup merge of #133702 - RalfJung:single-variant, r=oli-obk
...
Variants::Single: do not use invalid VariantIdx for uninhabited enums
~~Stacked on top of https://github.com/rust-lang/rust/pull/133681 , only the last commit is new.~~
Currently, `Variants::Single` for an empty enum contains a `VariantIdx` of 0; looking that up in the enum variant list will ICE. That's quite confusing. So let's fix that by adding a new `Variants::Empty` case for types that have 0 variants.
try-job: i686-msvc
2024-12-19 16:48:07 +08:00
bors
c6e1649b42
Auto merge of #133328 - nnethercote:simplify-SwitchInt-handling, r=tmiasko
...
Simplify `SwitchInt` handling
Dataflow handling of `SwitchInt` is currently complicated. This PR simplifies it.
r? `@cjgillot`
2024-12-18 22:57:23 +00:00
Oli Scherer
4c639105f0
Merge pull request #4072 from tiif/blockop
...
Implement blocking unnamed_socket
2024-12-18 19:23:42 +00:00
Lukas Wirth
27fac08c82
Merge pull request #18715 from aibaars/ungram-asm-option
...
Fix AsmOption rule in rust.ungram
2024-12-18 14:22:05 +00:00
Lukas Wirth
a229bc8e79
Merge pull request #18716 from Veykril/push-lyxuzrnkmklp
...
fix: Consider both completion detail fields in to_proto
2024-12-18 14:14:39 +00:00
Lukas Wirth
e89d72056b
fix: Consider both completion detail fields in to_proto
2024-12-18 15:00:09 +01:00
Arthur Baars
cb2829eaa7
Fix AsmOption rule in rust.ungram
2024-12-18 14:56:00 +01:00
bors
33a0d73dd2
Auto merge of #134428 - nikic:llvm-19.1.6, r=cuviper
...
Update to LLVM 19.1.6
Fixes the wasm64 build failure reported at https://github.com/rust-lang/llvm-project/pull/180 .
2024-12-18 13:28:28 +00:00
Lukas Wirth
e1b7d77ead
Merge pull request #18714 from Veykril/push-krxvsqwrokwp
...
fix: Do not ask the client to resolve for non existing label details
2024-12-18 13:24:53 +00:00
Lukas Wirth
683150f4da
fix: Do not ask the client ro resolve for non existing label details
2024-12-18 14:03:50 +01:00
Lukas Wirth
d7fa33e2d0
Merge pull request #18713 from Veykril/push-zmmkzspnwxsn
...
internal: Cleanup label structure of `CompletionItem`
2024-12-18 12:53:07 +00:00
Lukas Wirth
540ada516a
internal: Cleanup label structure of CompletionItem
2024-12-18 13:37:21 +01:00
Lukas Wirth
c70b07b3c9
Merge pull request #18711 from Veykril/push-kwurwxttmqwo
...
Taking a raw ref of a deref is always safe
2024-12-18 10:47:07 +00:00
Lukas Wirth
dfa46292b6
Taking a raw ref of a deref is always safe
2024-12-18 11:32:29 +01:00
Ralf Jung
c858ce132f
make no-variant types a dedicated Variants variant
2024-12-18 11:01:54 +01:00
Ralf Jung
d7d08ae95c
Variants::Single: do not use invalid VariantIdx for uninhabited enums
2024-12-18 11:00:21 +01:00
Lukas Wirth
cbf3443d8a
Merge pull request #18710 from Veykril/push-oywuruktpozm
...
Remove salsa from proc-macro server dep tree
2024-12-18 09:38:49 +00:00
Lukas Wirth
3d63140758
Remove salsa from proc-macro server dep tree
2024-12-18 10:24:26 +01:00
bors
c61ffa0706
Auto merge of #134425 - clubby789:cargo-update, r=jieyouxu
...
Pin `cc` and run `cargo update`
`cc` tends to cause issues with automatic bumps so locking it to be bumped individually when necessary
<details>
<summary>compiler and tools dependencies</summary>
```
Updating allocator-api2 v0.2.20 -> v0.2.21
Updating annotate-snippets v0.11.4 -> v0.11.5
Updating anyhow v1.0.93 -> v1.0.94
Updating bstr v1.11.0 -> v1.11.1
Updating chrono v0.4.38 -> v0.4.39
Updating clap v4.5.21 -> v4.5.23
Updating clap_builder v4.5.21 -> v4.5.23
Updating clap_complete v4.5.38 -> v4.5.39
Updating clap_lex v0.7.3 -> v0.7.4
Updating colored v2.1.0 -> v2.2.0
Updating console v0.15.8 -> v0.15.10
Updating crossbeam-channel v0.5.13 -> v0.5.14
Updating crossbeam-deque v0.8.5 -> v0.8.6
Updating crossbeam-utils v0.8.20 -> v0.8.21
Updating encode_unicode v0.3.6 -> v1.0.0
Updating fastrand v2.2.0 -> v2.3.0
Updating home v0.5.9 -> v0.5.11
Updating js-sys v0.3.74 -> v0.3.76
Updating libc v0.2.167 -> v0.2.168
Updating miniz_oxide v0.8.0 -> v0.8.1
Updating pest v2.7.14 -> v2.7.15
Updating pest_derive v2.7.14 -> v2.7.15
Updating pest_generator v2.7.14 -> v2.7.15
Updating pest_meta v2.7.14 -> v2.7.15
Updating redox_syscall v0.5.7 -> v0.5.8
Updating rustc-stable-hash v0.1.0 -> v0.1.1
Updating rustix v0.38.41 -> v0.38.42
Updating self_cell v1.0.4 -> v1.1.0
Updating semver v1.0.23 -> v1.0.24
Updating serde v1.0.215 -> v1.0.216
Updating serde_derive v1.0.215 -> v1.0.216
Adding thiserror v2.0.7
Adding thiserror-impl v2.0.7
Updating time v0.3.36 -> v0.3.37
Updating time-macros v0.2.18 -> v0.2.19
Updating tokio v1.41.1 -> v1.42.0
Updating wasm-bindgen v0.2.97 -> v0.2.99
Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
Updating wasm-encoder v0.221.0 -> v0.221.2
Updating wasmparser v0.221.0 -> v0.221.2
Updating wast v221.0.0 -> v221.0.2
Updating wat v1.221.0 -> v1.221.2
```
</details>
<details>
<summary>library dependencies</summary>
```
Updating allocator-api2 v0.2.20 -> v0.2.21
Updating libc v0.2.167 -> v0.2.168
```
</details>
<details>
<summary>rustbook dependencies</summary>
```
Updating anyhow v1.0.93 -> v1.0.94
Updating bstr v1.11.0 -> v1.11.1
Updating chrono v0.4.38 -> v0.4.39
Updating clap v4.5.21 -> v4.5.23
Updating clap_builder v4.5.21 -> v4.5.23
Updating clap_complete v4.5.38 -> v4.5.39
Updating clap_lex v0.7.3 -> v0.7.4
Updating fastrand v2.2.0 -> v2.3.0
Updating js-sys v0.3.74 -> v0.3.76
Updating libc v0.2.167 -> v0.2.168
Updating miniz_oxide v0.8.0 -> v0.8.1
Updating pest v2.7.14 -> v2.7.15
Updating pest_derive v2.7.14 -> v2.7.15
Updating pest_generator v2.7.14 -> v2.7.15
Updating pest_meta v2.7.14 -> v2.7.15
Updating pulldown-cmark-to-cmark v19.0.0 -> v19.0.1
Updating redox_syscall v0.5.7 -> v0.5.8
Updating rustix v0.38.41 -> v0.38.42
Updating semver v1.0.23 -> v1.0.24
Updating serde v1.0.215 -> v1.0.216
Updating serde_derive v1.0.215 -> v1.0.216
Adding thiserror v2.0.7
Adding thiserror-impl v2.0.7
Updating wasm-bindgen v0.2.97 -> v0.2.99
Updating wasm-bindgen-backend v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro v0.2.97 -> v0.2.99
Updating wasm-bindgen-macro-support v0.2.97 -> v0.2.99
Updating wasm-bindgen-shared v0.2.97 -> v0.2.99
Removing windows-sys v0.52.0
```
</details>
2024-12-18 09:23:22 +00:00
Lukas Wirth
2780dfd80c
Merge pull request #18708 from ChayimFriedman2/fix-tiny
...
fix: Fix pretty-printing of `@` patterns
2024-12-18 07:41:09 +00:00
Oli Scherer
7b96a537e0
Merge pull request #4097 from rust-lang/rustup-2024-12-18
...
Automatic Rustup
2024-12-18 05:28:59 +00:00
The Miri Cronjob Bot
a2336ab277
Merge from rustc
2024-12-18 05:03:32 +00:00
Chayim Refael Friedman
8c8e738636
Fix pretty-printing of @
patterns
...
It didn't print the `@`.
2024-12-18 01:24:12 +02:00
bors
9321f7efa9
Auto merge of #134376 - jdonszelmann:fix-rustdoc-perf, r=jieyouxu
...
Try to fix perf regression in rustdoc after hir attributes
Slight performance regression introduced in #131808
r? `@jieyouxu`
2024-12-17 21:34:13 +00:00
bors
e301414581
Auto merge of #134381 - jdonszelmann:move-attribute-types, r=oli-obk
...
Split up attribute parsing code and move data types to `rustc_attr_data_structures`
This change renames `rustc_attr` to `rustc_attr_parsing`, and splits up the parsing code. At the same time, all the data types used move to `rustc_attr_data_structures`. This is in preparation of also having a third crate: `rustc_attr_validation`
I initially envisioned this as two separate PRs, but I think doing it in one go reduces the number of ways others would have to rebase their changes on this. However, I can still split them.
r? `@oli-obk` (we already discussed how this is a first step in a larger plan)
For a more detailed plan on how attributes are going to change, see https://github.com/rust-lang/rust/issues/131229
Edit: this looks like a giant PR, but the changes are actually rather trivial. Each commit is reviewable on its own, and mostly moves code around. No new logic is added.
2024-12-17 18:50:50 +00:00
bors
a9740c92b9
Auto merge of #130766 - clarfonthey:stable-coverage-attribute, r=wesleywiser
...
Stabilize #[coverage] attribute
Closes #84605 , which passed FCP.
Stabilisation report here: https://github.com/rust-lang/rust/issues/84605#issuecomment-2166514660
Also added to reference here: rust-lang/reference#1628
---
try-job: aarch64-apple
try-job: x86_64-gnu
try-job: x86_64-msvc
2024-12-17 15:56:58 +00:00
bors
8a1d610714
Auto merge of #134302 - bjorn3:remove_driver_queries, r=oli-obk,jieyouxu
...
Remove queries from the driver interface
All uses of driver queries in the public api of rustc_driver have been removed in https://github.com/rust-lang/rust/pull/134130 already. This removes driver queries from rustc_interface and does a couple of cleanups around TyCtxt construction and entering enabled by this removal.
Finishes the removal of driver queries started with https://github.com/rust-lang/rust/pull/126834 .
2024-12-17 04:57:40 +00:00
ltdk
c180e41198
Stabilize #[coverage] attribute
2024-12-16 21:07:06 -05:00
bors
30533cfafb
Auto merge of #134132 - MarcoIeni:linux-4c-to-ubuntu-22, r=Kobzol
...
CI: update linux 4c from ubuntu 20 to ubuntu 22
2024-12-17 01:49:31 +00:00
bors
3fb7f64534
Auto merge of #134095 - Kobzol:datadog-lockfile, r=MarcoIeni
...
[CI] Use a lockfile for installing the `datadog` package
Without a lockfile, it could fail to compile when the dependencies have changed. Reported [here](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/CI.20failure.20in.20DataDog.20upload ).
r? `@jdno`
try-job: x86_64-msvc-ext2
2024-12-16 23:07:24 +00:00
Lukas Wirth
0a706f7d2a
Merge pull request #18700 from ChayimFriedman2/dyn-send
...
fix: Fix a panic with a diagnostics fix when a keyword is used as a field
2024-12-16 21:54:28 +00:00
Chayim Refael Friedman
79214583f6
Use a record struct instead of a tuple for each namespace in PerNs
...
The reason I did this is because I plan to add another field to this struct (indicating whether the item was cfg'ed out), but it seems worthy even separately and removes a bunch of one-letter variable names and tuple-indexing. It is also easy to separate from future changes, so it will be easier to review this way.
2024-12-16 22:39:50 +02:00
Chayim Refael Friedman
8277c0336e
Fix a panic with a diagnostics fix when a keyword is used as a field
...
I found it easiest to fix in the quickfix code, and not deeper (e.g. body lowering).
2024-12-16 19:58:29 +02:00
bors
056cb60f90
Auto merge of #134377 - lnicola:sync-from-ra, r=lnicola
...
Subtree update of `rust-analyzer`
r? `@ghost`
2024-12-16 13:07:24 +00:00
Lukas Wirth
dc6af80ed0
Merge pull request #18699 from Veykril/push-ltqwwusvtlot
...
fix: Fix path qualified auto-importing completions not working with re-exports
2024-12-16 12:34:59 +00:00
Lukas Wirth
ada5f2059c
fix: Fix path qualified auto-importing completions not working with re-exports
...
Prior to this commit we used to generate import paths, then zipped them with the existing qualifier to check if they agree on the path to import.
This is brittle when re-exports come into play causing items to have multiple applicable paths that refer to them.
This commit instead rewrites this logic by generating the import path for the qualifier, verifying that the rest of the qualifier resolves and then doing a final lookup on that resolution result for the final segment instead.
2024-12-16 13:20:55 +01:00
Lukas Wirth
65c8d1242b
Merge pull request #18698 from Veykril/push-vpqwrwxptsql
...
internal: Don't serialize empty fields in completions and resolve payloads
2024-12-16 10:39:19 +00:00
Lukas Wirth
61c222e1af
Merge pull request #18690 from Giga-Bowser/extract-variable-string
...
feat: Use string literal contents as a name when extracting into variable
2024-12-16 10:29:05 +00:00
Lukas Wirth
de7808bb71
internal: Don't serialize empty fields in completions and resolve payloads
2024-12-16 11:25:29 +01:00
Lukas Wirth
0189a8937b
Merge pull request #18695 from roife/improve-tuple-destruction
...
minor: improve name suggestion for destructure_tuple_binding
2024-12-16 10:25:01 +00:00
Lukas Wirth
efafe66a78
Merge pull request #18696 from ChayimFriedman2/syn-syn
...
feat: Report unresolved idents for implicit captures in `format_args!()`
2024-12-16 09:33:51 +00:00
Lukas Wirth
910e705932
Merge pull request #18697 from Veykril/push-qtmmtvpyrntr
...
internal: Simplify ratoml testdir usage
2024-12-16 09:16:18 +00:00
Lukas Wirth
1b27ba86eb
internal: Simplify ratoml testdir usage
2024-12-16 10:01:35 +01:00
Chayim Refael Friedman
54ce1dda3a
Report unresolved idents for implicit captures in format_args!()
...
And also a bit of cleanup by storing the capture's span with the open quote included.
2024-12-16 10:10:26 +02:00
roife
ad63e6957f
refactor: simplify edit_tuple_usages
in destructure_tuple_binding
2024-12-16 14:12:19 +08:00
Laurențiu Nicola
27e824fad4
Merge pull request #18693 from Veykril/push-wzoomkkmuolm
...
fix: Fix proc-macro dylib names on windows
2024-12-15 18:32:38 +00:00