Commit Graph

284115 Commits

Author SHA1 Message Date
Michael Goulet
dc0cdfd753 Squash fold into ty 2025-03-15 06:34:36 +00:00
bors
282865097d Auto merge of - fmease:rollup-j2j5h59, r=fmease
Rollup of 9 pull requests

Successful merges:

 -  (rustc_target: Add target features for LoongArch v1.1)
 -  (Build GCC on CI with GCC, not Clang)
 -  (Improve post-merge workflow)
 -  (Pass struct field HirId when check_expr_struct_fields)
 -  (Refactor is_snake_case.)
 -  (Fix HIR printing of parameters)
 -  (Mirror NetBSD sources)
 -  (Make `Parser::parse_expr_cond` public)
 -  (Fix typo in hir lowering lint diag)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-15 02:22:46 +00:00
León Orell Valerian Liehr
9838591694
Rollup merge of - yotamofek:pr/hir-lint-typo, r=compiler-errors
Fix typo in hir lowering lint diag
2025-03-15 00:18:27 +01:00
León Orell Valerian Liehr
79775921aa
Rollup merge of - mohe2015:rustc-parse-pub-parse-expr-cond, r=oli-obk
Make `Parser::parse_expr_cond` public

This allows usage in rustfmt and rustfmt forks.

I'm using this for custom macro formatting, see 30c83df9e1/src/parse/macros/html.rs (L57)

It would be great if this could be upstreamed so I don't need to rely on a fork.
2025-03-15 00:18:26 +01:00
León Orell Valerian Liehr
9b8a6771bc
Rollup merge of - Kobzol:netbsd-mirror, r=Mark-Simulacrum
Mirror NetBSD sources

Should avoid issues with NetBSD servers.

r? ``@Mark-Simulacrum``

try-job: `*netbsd*`
2025-03-15 00:18:26 +01:00
León Orell Valerian Liehr
370f8fb99d
Rollup merge of - nnethercote:fix-hir-printing, r=compiler-errors
Fix HIR printing of parameters

HIR pretty printing does the wrong thing for anonymous parameters, and there is no test coverage for it. This PR remedies both of those things.

r? ``@lcnr``
2025-03-15 00:18:25 +01:00
León Orell Valerian Liehr
03cda6b022
Rollup merge of - remexre:refactor-is-snake-case, r=compiler-errors
Refactor is_snake_case.

I wondered what the definition of this actually was, and found the original hard to read. I believe this change preserves the original behavior, but is hopefully clearer.
2025-03-15 00:18:25 +01:00
León Orell Valerian Liehr
43c41a801a
Rollup merge of - xizheyin:issue-138319, r=petrochenkov
Pass struct field HirId when check_expr_struct_fields

Fixes 

r? compiler

cc ``@Mark-Simulacrum``
2025-03-15 00:18:24 +01:00
León Orell Valerian Liehr
756b17975f
Rollup merge of - Kobzol:post-merge-workflow-fixes, r=jieyouxu
Improve post-merge workflow

Contains various fixes for the post-merge workflow implemented in https://github.com/rust-lang/rust/pull/138013, which were suggested on Zulip. This PR changes the grouping of test diffs and ignores doctests, as they are too noisy.

I'll post an example output (before/after this PR) in comments below.

r? ```@jieyouxu```
2025-03-15 00:18:23 +01:00
León Orell Valerian Liehr
fc7ac81979
Rollup merge of - Kobzol:gcc-ci-build-gcc, r=GuillaumeGomez
Build GCC on CI with GCC, not Clang

It seems that GCC built with Clang misbehaves. I have tested that cg_gcc tests [pass](https://github.com/rust-lang/rust/actions/runs/13842365913/job/38732750617?pr=138451) on CI with a downloaded GCC that was built in this way.

Prerequisite for https://github.com/rust-lang/rust/pull/138395.

r? ```@ghost```
2025-03-15 00:18:23 +01:00
León Orell Valerian Liehr
10055fb03a
Rollup merge of - heiher:loong64v1.1-features, r=petrochenkov
rustc_target: Add target features for LoongArch v1.1

This patch adds new target features for LoongArch v1.1:

* div32
* lam-bh
* lamcas
* ld-seq-sa
* scq
2025-03-15 00:18:22 +01:00
bors
d9e5539a39 Auto merge of - weihanglo:update-cargo, r=weihanglo
Update cargo

15 commits in ab1463d632528e39daf35f263e10c14cbe590ce8..6cf8267012570f63d6b86e85a2ae5627de52df9e
2025-03-08 01:45:05 +0000 to 2025-03-14 15:25:36 +0000
- feat(package): add --exclude-lockfile flag ()
- Redox OS is part of the unix family ()
- docs(ref): Mention `x.y.*` as a kind of version requirement to avoid. ()
- fix(run): Disambiguate bins from different packages that share a name ()
- cargo vendor: Add context which workspace failed to resolve ()
- docs(ref): Note that target-edition is deprecated ()
- refactor(toml): Centralize target descriptions ()
- docs(refs): Add `unsafe` to `extern` while using build scripts in Cargo Book ()
- Replace unmaintained humantime crate with jiff ()
- Add terminal integration via ANSI OSC 9;4 sequences ()
- feat: add completions for add --path ()
- Allow `term.progress.when` to default ()
- docs: spelling and grammar fixes ()
- chore(deps): update cargo-semver-checks to v0.40.0 ()
- Typo fixes ()

r? ghost
2025-03-14 23:15:28 +00:00
Yotam Ofek
e6f7ab50c0 Small grammar fix in comment 2025-03-14 21:03:21 +00:00
Yotam Ofek
5da1ba41b3 Fix typo in hir lowering lint diag 2025-03-14 21:03:21 +00:00
Weihang Lo
58e083021e
Update cargo 2025-03-14 16:44:43 -04:00
Moritz Hedtke
66c49c73ee Make Parser::parse_expr_cond public.
This allows usage in rustfmt and rustfmt forks.
2025-03-14 19:55:55 +01:00
bors
ecade534c6 Auto merge of - fmease:rollup-ve4h2eq, r=fmease
Rollup of 9 pull requests

Successful merges:

 -  (Display valid crate types in error message for --crate-type flag)
 -  (Provide helpful diagnostics for shebang lookalikes)
 -  (remove must_use from <*const T>::expose_provenance)
 -  (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`)
 -  (remove comment regarding a removed test directive)
 -  (Deny impls for `BikeshedGuaranteedNoDrop`)
 -  (Rustc dev guide subtree update)
 -  (Pass `CI_JOB_DOC_URL` to Docker)
 -  (Take a break from reviews)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-14 17:00:17 +00:00
Jakub Beránek
9e3805d6d3 Mirror NetBSD sources 2025-03-14 17:44:07 +01:00
León Orell Valerian Liehr
401b325fb7
Rollup merge of - ChrisDenton:vacate, r=ChrisDenton
Take a break from reviews
2025-03-14 17:26:41 +01:00
León Orell Valerian Liehr
c5e3857492
Rollup merge of - Kobzol:fix-doc-url-docker, r=marcoieni
Pass `CI_JOB_DOC_URL` to Docker

Fix-up for https://github.com/rust-lang/rust/pull/136911. I always forget to pass new environment variables to Docker images.. 🤦‍♂️

r? `@marcoieni`

try-job: x86_64-fuchsia
2025-03-14 17:26:39 +01:00
León Orell Valerian Liehr
8eeecb78ca
Rollup merge of - BoxyUwU:rdg-push, r=jieyouxu
Rustc dev guide subtree update

r? `@jieyouxu`
2025-03-14 17:26:37 +01:00
León Orell Valerian Liehr
c42866f89d
Rollup merge of - compiler-errors:deny-bikeshed-guaranteed-no-drop, r=lcnr
Deny impls for `BikeshedGuaranteedNoDrop`

r? lcnr
2025-03-14 17:26:36 +01:00
León Orell Valerian Liehr
1e7441f145
Rollup merge of - tshepang:patch-6, r=onur-ozkan
remove comment regarding a removed test directive

Removed in https://github.com/rust-lang/rust/pull/120265
2025-03-14 17:26:32 +01:00
León Orell Valerian Liehr
40ac358b81
Rollup merge of - Kobzol:remove-run-check-with-parallel-queries, r=Mark-Simulacrum,onur-ozkan
Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`

After https://github.com/rust-lang/rust/pull/132282, I'm pretty sure that this is simply useless? It just runs check with an empty config, lol.

CC `@onur-ozkan`

r? `@Noratrieb`
2025-03-14 17:26:23 +01:00
León Orell Valerian Liehr
ffa96fe451
Rollup merge of - RalfJung:expose-provenance-must-use, r=ibraheemdev
remove must_use from <*const T>::expose_provenance

`<*mut T>::expose_provenance` does not have this attribute, and in fact the function is documented to have a side-effect, so there are perfectly legitimate use-cases where the return value would be ignored.
2025-03-14 17:26:20 +01:00
León Orell Valerian Liehr
881d237cd9
Rollup merge of - Pyr0de:issue_137249, r=fmease
Provide helpful diagnostics for shebang lookalikes

When `[` is not found after a `#!`, a note will be added to the exisiting error

```
error: expected `[`, found `/`
 --> src/main.rs:2:3
  |
2 | #!/usr/bin/env -S cargo +nightly -Zscript
  |   ^ expected `[`
  |
  = note: the token sequence `#!` here looks like the start of a shebang interpreter directive but it is not
  = help: if you meant this to be a shebang interpreter directive, move it to the very start of the file
```

Fixes 

r? `@fmease`
2025-03-14 17:26:17 +01:00
León Orell Valerian Liehr
f8842bd752
Rollup merge of - malezjaa:feat/crate-type-valid-values, r=jieyouxu
Display valid crate types in error message for --crate-type flag

This PR improves the error message for the --crate-type flag. When an invalid crate type is provided, the compiler will now show a list of valid options.

### Before
![image](https://github.com/user-attachments/assets/4922e4e5-eeca-40cd-ac1c-1c6319a81aee)

### After
![image](https://github.com/user-attachments/assets/67ea1f35-aa41-4e4f-8691-47c273d0cff9)

I based the implementation on `OutputType::shorthands_display`

Closes 
2025-03-14 17:26:13 +01:00
bors
cb50d4d856 Auto merge of - Ayush1325:uefi-path-node, r=nicholasbishop,cuviper
uefi: helpers: Add DevicePathNode abstractions

- UEFI device path is a series of nodes layed out in a contiguous memory region. So it makes sense to use Iterator abstraction for modeling DevicePaths
- This PR has been split off from  for easier review. The allow dead_code will be removed in 

cc `@nicholasbishop`
2025-03-14 13:55:32 +00:00
Chris Denton
db8aa92a47
Take a break from reviews 2025-03-14 12:09:40 +00:00
Jakub Beránek
2aa68ac429
Remove RUN_CHECK_WITH_PARALLEL_QUERIES
It is useless after the removal of the parallel compiler configuration.
2025-03-14 11:12:03 +01:00
Jakub Beránek
7afad54758
Pass CI_JOB_DOC_URL to Docker 2025-03-14 11:10:38 +01:00
Jakub Beránek
bf095f6ece
Ensure that GCC is not built using Clang, as it misbehaves 2025-03-14 09:16:06 +01:00
Jakub Beránek
6ef465ba12
Add clarification about doctests 2025-03-14 09:09:26 +01:00
许杰友 Jieyou Xu (Joe)
3d9bf08289
Merge pull request from jieyouxu/sync
Rustc pull
2025-03-14 16:08:03 +08:00
malezjaa
90bf2b159a Show valid crate types when the user passes unknown --crate-type value
Co-authored-by: Jieyou Xu <jieyouxu@outlook.com>
2025-03-14 15:53:42 +08:00
bors
f7b4354283 Auto merge of - jhpratt:rollup-y3b8wu5, r=jhpratt
Rollup of 16 pull requests

Successful merges:

 -  (Overhaul examples for PermissionsExt)
 -  (Reword incorrect documentation about SocketAddr having varying layout)
 -  (Sync Fuchsia target spec with clang Fuchsia driver)
 -  (Add documentation URL to selected jobs)
 -  ( Improve HashMap docs for const and static initializers)
 -  (Add `src/tools/x` to the main workspace)
 -  (use `expect` instead of `allow`)
 -  (Enable metrics and verbose tests in PR CI)
 -  (atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance)
 -  (fix: remove the check of lld not supporting `@response-file)`
 -  (Visit `PatField` when collecting lint levels)
 -  (update error message)
 -  (EUV: fix place of deref pattern's interior's scrutinee)
 -  (Remove usage of legacy scheme paths on RedoxOS)
 -  (Remove an outdated line from a test comment)
 -  (Remove myself from libs review)

Failed merges:

 -  (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-14 07:02:26 +00:00
xizheyin
aad1db7373
Pass precise HirId when calling check_stability
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-14 14:51:58 +08:00
Tshepang Mbambo
a863f2c6b2
Merge pull request from KonaeAkira/master
Fix grammar and remove redundant info
2025-03-14 08:50:49 +02:00
Jacob Pratt
dea8a15d21
Rollup merge of - cuviper:libs-review, r=jieyouxu
Remove myself from libs review

Trying to re-balance my work by reducing reviews for now.
2025-03-14 01:37:37 -04:00
Jacob Pratt
db022a82a5
Rollup merge of - WaffleLapkin:indate-comment, r=ehuss
Remove an outdated line from a test comment

They *used* to not work, however this was fixed in the PR that added the test. I forgot to remove this line or possibly lost its removal while rebasing.

r? `@ehuss`
2025-03-14 01:37:36 -04:00
Jacob Pratt
f6fcae0015
Rollup merge of - bjorn3:redox_scheme_paths, r=Noratrieb
Remove usage of legacy scheme paths on RedoxOS

The `name:/path` path syntax is getting phased out[^1] in favor of `/scheme/name/path`. Also using `null:` is no longer necessary as `/dev/null` is available on Redox OS too.

[^1]: https://gitlab.redox-os.org/redox-os/rfcs/-/blob/master/text/0006-scheme-path.md

cc `@jackpot51`
2025-03-14 01:37:36 -04:00
Jacob Pratt
f5055722b6
Rollup merge of - dianne:deref-pat-euv-fix, r=compiler-errors
EUV: fix place of deref pattern's interior's scrutinee

The place previously used here was that of the temporary holding the reference returned by `Deref::deref` or `DerefMut::deref_mut`. However, since the inner pattern of `deref!(inner)` expects the deref-target type itself, this would ICE when that type was inspected (e.g. by the EUV case for slice patterns). This adds a deref projection to fix that.

Since current in-tree consumers of EUV (upvar inference and clippy) don't care about Rvalues, the place could be simplified to `self.cat_rvalue(pat.hir_id, self.pat_ty_adjusted(subpat)?)` to save some cycles. I personally find EUV to be a bit fragile, so I've opted for pedantic correctness. Maybe a `HACK` comment would suffice though?

Fixes 

r? `@compiler-errors`
2025-03-14 01:37:35 -04:00
Jacob Pratt
7de35c8bb8
Rollup merge of - tshepang:patch-5, r=jieyouxu
update error message

[`compile-pass` has since been renamed to `build-pass`](https://github.com/rust-lang/rust/issues/62277)
2025-03-14 01:37:34 -04:00
Jacob Pratt
fb2a7fa209
Rollup merge of - compiler-errors:lint-level-pat-field, r=jieyouxu
Visit `PatField` when collecting lint levels

Fixes 

Side-note, I vaguely skimmed over the other nodes we could be visiting here and it doesn't *seem* to me that we're missing anything, though I may be mistaken given recent(?) support for attrs in where clauses(??). Can be fixed in a follow-up PR.
2025-03-14 01:37:34 -04:00
Jacob Pratt
e928a8f4a0
Rollup merge of - weihanglo:lld, r=lqd
fix: remove the check of lld not supporting @response-file

In LLVM v9, lld has supported `@response-file.`
LLVM v9 was released on 2019-09-19.
The check was added back to 2018-03-14 (1.26.0) via 04442af18b.
It has been more than five years, and we ship our own lld regardlessly.
This should be happily removed.

See also:

* <bb12396f91>
* <https://reviews.llvm.org/D63024>
2025-03-14 01:37:33 -04:00
Jacob Pratt
91e4bab25f
Rollup merge of - RalfJung:atomic-intrinsics-provenance, r=nnethercote
atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance

The provenance semantics match what Miri implements and what the `AtomicPtr` API expects.
2025-03-14 01:37:32 -04:00
Jacob Pratt
637f059aef
Rollup merge of - Kobzol:ci-metrics, r=marcoieni
Enable metrics and verbose tests in PR CI

When debugging CI, I relatively often need to examine what tests are executed on PR CI, and what bootstrap steps does it execute. However, we currently disable both verbose tests and bootstrap metrics on PR CI for some reason.

I'm not actually sure why though, as the PR that (probably) introduced this behavior (https://github.com/rust-lang/rust/pull/51367) didn't explain why.

CC `@oli-obk`
2025-03-14 01:37:32 -04:00
Jacob Pratt
82d4ab6105
Rollup merge of - onur-ozkan:use-expect, r=jieyouxu
use `expect` instead of `allow`

This is more useful than `allow` as compiler will force us to remove rules that are no longer valid (we already got a few of them in this change).
2025-03-14 01:37:31 -04:00
Jacob Pratt
b9c33fac62
Rollup merge of - cuviper:x, r=jieyouxu
Add `src/tools/x` to the main workspace

The original reason to exclude it was so it could run before submodules
were initialized. However, those have all been converted to subtrees
now, so the entire workspace is always ready to go.

I've also alphabetized the workspace members, as it was an untidy mess. 🧹
2025-03-14 01:37:31 -04:00
Jacob Pratt
936e51ee12
Rollup merge of - karolzwolak:lazylock-const-hashmaps-137566, r=cuviper
Improve HashMap docs for const and static initializers

Closes .
I clarified the HashMap usage in const and static initializers.
I also added examples of how to construct such HashMaps wrapped in LazyLock.
2025-03-14 01:37:30 -04:00