Commit graph

284228 commits

Author SHA1 Message Date
许杰友 Jieyou Xu (Joe)
3d9bf08289
Merge pull request #2283 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 #138480 - jhpratt:rollup-y3b8wu5, r=jhpratt
Rollup of 16 pull requests

Successful merges:

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

Failed merges:

 - #138452 (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 #2285 from KonaeAkira/master
Fix grammar and remove redundant info
2025-03-14 08:50:49 +02:00
Jacob Pratt
dea8a15d21
Rollup merge of #138466 - 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 #138461 - 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 #138457 - 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 #138442 - 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 #125059

r? `@compiler-errors`
2025-03-14 01:37:35 -04:00
Jacob Pratt
7de35c8bb8
Rollup merge of #138441 - 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 #138434 - compiler-errors:lint-level-pat-field, r=jieyouxu
Visit `PatField` when collecting lint levels

Fixes #138428

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 #138432 - 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 #138398 - 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 #138396 - 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 #138389 - 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 #138179 - 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 #137870 - karolzwolak:lazylock-const-hashmaps-137566, r=cuviper
Improve HashMap docs for const and static initializers

Closes #137566.
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
Jacob Pratt
6ae5c8df1d
Rollup merge of #136911 - Kobzol:ci-helper-link, r=marcoieni
Add documentation URL to selected jobs

This PR adds the possibility to attach URLs to selected CI jobs, which are then printed at the end of the CI log when a failure happens in that job. The motivation is to allow contributors to find how to fix the specific jobs more quickly.

This was proposed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Automatic.20useful.20links.20when.20a.20particular.20CI.20job.20fails.3F).

An example output can be seen [here](3871211252).

r? `@ghost`
2025-03-14 01:37:29 -04:00
Jacob Pratt
459352a217
Rollup merge of #136892 - erickt:fuchsia-target, r=jieyouxu
Sync Fuchsia target spec with clang Fuchsia driver

This updates the Fuchsia target spec with the [Clang Fuchsia driver], which picks up a few changes:

* Adds `-z start-stop-visibility=hidden` and `-z rel` to the pre link arguments.
* Adds `--execute-only` and `--fix-cortex-a53-843419` for `aarch64-unknown-fuchsia`.
* Enables the equivalent cpu features for `x86-64-v2` for `x86_64-unknown-fuchsia`, which is our minimum supported x86_64 platform according to [RFC-0073].

try-job: x86_64-fuchsia

[Clang Fuchsia driver]: 8374d42186/clang/lib/Driver/ToolChains/Fuchsia.cpp
[RFC-0073]: https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0073_x86_64_platform_requirement
2025-03-14 01:37:29 -04:00
Jacob Pratt
595c624fbe
Rollup merge of #136230 - clarfonthey:net-memory-layout-assumptions, r=cuviper
Reword incorrect documentation about SocketAddr having varying layout

This has no longer been the case since these types were moved to `core`. The note on portability remains, but it is reworded to not imply that the size varies by target.
2025-03-14 01:37:28 -04:00
Jacob Pratt
c62707eb74
Rollup merge of #136001 - hkBst:patch-21, r=cuviper
Overhaul examples for PermissionsExt

This fixes #91707 by including one overarching example, instead of the small examples that can be misleading.
2025-03-14 01:37:28 -04:00
bors
523c507d26 Auto merge of #138157 - scottmcm:inline-more-tiny-things, r=oli-obk
Allow more top-down inlining for single-BB callees

This means that things like `<usize as Step>::forward_unchecked` and `<PartialOrd for f32>::le` will inline even if
we've already done a bunch of inlining to find the calls to them.

Fixes #138136

~~Draft as it's built atop #138135, which adds a mir-opt test that's a nice demonstration of this.  To see just this change, look at <48f63e3be5>~~ Rebased to be just the inlining change, as the other existing tests show it great.
2025-03-14 03:51:19 +00:00
Michael Goulet
4c32adbadb Deny impls for BikeshedGuaranteedNoDrop 2025-03-14 03:11:43 +00:00
Michael Goulet
0160c60c78 Check type of const param correctly in MIR typeck 2025-03-14 03:10:19 +00:00
WANG Rui
d989bf5bbe rustc_target: Add target features for LoongArch v1.1 2025-03-14 09:52:02 +08:00
Diane Ringo
b9f0ca11bc Refactor is_snake_case. 2025-03-13 20:31:59 -05:00
KonaeAkira
ccde0a2203 Fix formatting (line too long) 2025-03-14 01:45:10 +01:00
bors
addae0705c Auto merge of #138391 - scottmcm:SSA-discriminants, r=WaffleLapkin
Don't `alloca` just to look at a discriminant

Today we're making LLVM do a bunch of extra work when you match on trivial stuff like `Option<bool>` or `ControlFlow<u8>`.

This PR changes that so that simple types like `Option<u32>` or `Result<(), Box<Error>>` can stay as `OperandValue::ScalarPair` and we can still read the discriminant from them, rather than needing to write them into memory to have a `PlaceValue` just to get the discriminant out.

Fixes #137503
2025-03-14 00:42:31 +00:00
KonaeAkira
82a79b99e1 Add codegen test for modulo with power-of-two divisor 2025-03-14 01:27:07 +01:00
KonaeAkira
88aaf1d25a Fix grammar and remove redundant info 2025-03-13 23:56:04 +01:00
Nicholas Nethercote
79e4be1e9f Remove the ref from FnParam::Ident. 2025-03-14 09:45:41 +11:00
Nicholas Nethercote
bebd91feb3 Fix HIR param pretty printing some more.
Anonymous params are currently represented with `kw::Empty`, so handle
that properly. (Subsequent commits will get rid of the `kw::Empty`.)
2025-03-14 09:45:41 +11:00
Nicholas Nethercote
958bc7b365 Handle _ properly in a couple of places.
Currently (PatKind::Wild` (i.e. `_`) gets turned by
`lower_fn_params_to_names` into an empty identifier, which means it is
printed incorrectly by HIR pretty printing.

And likewise for `lower_fn_params_to_names`, which affects some error
messages.

This commit fixes them. This requires a slight tweak in a couple of
places to continue using parameter numbers in some error messages. And
it improves the output of `tests/ui/typeck/cyclic_type_ice.rs`:
`/* _ */` is a better suggestion than `/*  */`.
2025-03-14 09:45:38 +11:00
Nicholas Nethercote
9714f60f1d Inline and remove FnParam::name.
It has a single call site.
2025-03-14 08:40:36 +11:00
Jakub Beránek
38fc11601e Store libgccjit.so in a lib directory in the GCC CI tarball 2025-03-13 21:32:23 +01:00
Jakub Beránek
34272a5468 Do not overwrite original config.toml in opt-dist
So that follow-up CI commands can proceed normally. It will also avoid overwriting `config.toml` when running opt-dist tests locally.
2025-03-13 21:29:46 +01:00
Jakub Beránek
3fc7ca0fee Use GCC for building GCC 2025-03-13 21:29:46 +01:00
Jakub Beránek
955aef5a4e Change GCC build flags 2025-03-13 21:29:20 +01:00
Jakub Beránek
c4371786d6 Create libgccjit.so.0 alias also for CI-downloaded GCC 2025-03-13 21:29:20 +01:00
bjorn3
43499bfe2e Remove has_redox_scheme
Redox OS is moving away from name:/path style paths to /scheme/name/path
style paths which are already handled correctly without has_redox_scheme.
2025-03-13 20:09:07 +00:00
Tshepang Mbambo
54d26b3756
remove comment regarding a removed test directive 2025-03-13 22:05:05 +02:00
bors
cbfdf0b014 Auto merge of #138459 - matthiaskrgr:rollup-hddfg18, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #138126 (Add an opt-out in pretty printing for RTN rendering)
 - #138399 (Delegation: allow foreign fns `reuse`)
 - #138406 (Update mdbook to 0.4.47)
 - #138417 (minor interpreter cleanups)
 - #138420 (Adapt to LLVM dropping CfiFunctionIndex::begin()/end())
 - #138423 (Don't emit error within cast function, propagate it as a `CastError`)
 - #138425 (Remove `feature = "hash_raw_entry"`)
 - #138427 (Fix RISC-V VxWorks LLVM target triples)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-03-13 19:46:35 +00:00
Nicholas Nethercote
e885122147 Add a pretty printing test for fn params.
Note that multiple parts of the output are incorrect. The following
commits will fix this.
2025-03-14 06:29:24 +11:00
许杰友 Jieyou Xu (Joe)
27d71f0946
Merge pull request #2284 from rust-lang/cuviper-patch-1
Remove the doc for `no-system-llvm`
2025-03-14 03:28:03 +08:00
Josh Stone
496788a490 Record the new settings checksums 2025-03-13 12:21:21 -07:00
Josh Stone
8c91fae5be Remove separate src/tools/x from rust-analyzer settings 2025-03-13 12:21:21 -07:00
Josh Stone
66deb691d6 Alphabetize the root workspace members 2025-03-13 12:21:14 -07:00
Josh Stone
abed12a132 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.
2025-03-13 12:18:32 -07:00
Josh Stone
190187bfa7
Remove the doc for no-system-llvm
This compiletest directive was removed in rust-lang/rust#120265.
2025-03-13 12:15:29 -07:00
Josh Stone
c88dfb2fc4 Remove myself from libs review
Trying to re-balance my work by reducing reviews for now.
2025-03-13 11:59:10 -07:00