Commit Graph

269427 Commits

Author SHA1 Message Date
León Orell Valerian Liehr
5f0626cdb1
Rollup merge of #132058 - adetaylor:use-rust-next-in-ci, r=lqd
CI: rfl: use rust-next temporary commit

Commit c95bbb59a9b22f9b838b15d28319185c1c884329 within rust-next contains some changes required to be compatible with upcoming arbitraty self types work. Roll RFL CI forward to the latest rust-next to include that work.

Related:
https://github.com/rust-lang/rust/pull/130225
https://github.com/rust-lang/rust/issues/44874

r? ``@ojeda``

try-job: x86_64-rust-for-linux
2024-10-23 17:24:32 +02:00
León Orell Valerian Liehr
bb65499b61
Rollup merge of #132054 - onur-ozkan:cargo-config, r=Kobzol
do not remove `.cargo` directory

If vendoring isn't used bootstrap removes `.cargo` directory, which prevents developers from setting certain options in the `.cargo/config.toml` file. This was introduced in https://github.com/rust-lang/rust/pull/97513 (specifically in [this commit](345eb14f6c)). Also, since https://github.com/rust-lang/rust/pull/123942, vendoring is now possible even in git sources, which means we shouldn't remove `.cargo` directory in git sources anymore.
2024-10-23 17:24:31 +02:00
León Orell Valerian Liehr
03cb7de189
Rollup merge of #131487 - graydon:wasm32v1-none, r=alexcrichton
Add wasm32v1-none target (compiler-team/#791)

This is a preliminary implementation of the MCP discussed in [compiler-team#791](https://github.com/rust-lang/compiler-team/issues/791). It's not especially "major" but you know, process! Anyway it adds a new wasm32v1-none target which just pins down a set of wasm features. I think this is close to the consensus that emerged when discussing it on Zulip so I figured I'd sketch to see how hard it is. Turns out not very.
2024-10-23 17:24:31 +02:00
León Orell Valerian Liehr
f2675002a0
Rollup merge of #131181 - dev-ardi:custom-differ, r=jieyouxu
Compiletest: Custom differ

This adds support for a custom differ for compiletests. It’s purely visual and helps produce cleaner output when UI tests fail.

I’m using an environment variable for now since it’s experimental and I don’t want to drill the cli arguments all the way down. Also did a bit of general cleanup while I was at it.

This is how it looks [with debug info silenced](https://github.com/rust-lang/rust/pull/131182) (#131182)
`COMPILETEST_DIFF_TOOL="/usr/bin/env difft --color always --background light --display side-by-side" ./x test tests/ui/parser`
![image](https://github.com/user-attachments/assets/f740ce50-7564-4469-be0a-86e24bc50eb8)
2024-10-23 17:24:30 +02:00
León Orell Valerian Liehr
4caa60c032
Rollup merge of #131043 - liwagu:unify, r=albertlarsan68,onur-ozkan
Refactor change detection for rustdoc and download-rustc

This pull request refactors the change detection logic in the build process by consolidating redundant code into a new helper method. The key changes include the removal of duplicate logic for checking changes in directories and the addition of a new method to handle this functionality.

Refactoring and code simplification:

* [`src/bootstrap/src/core/build_steps/tool.rs`](diffhunk://#diff-dc86e288bcf7b3ca3f8c127d3568fbafc785704883bc7fc336bd185910aed5daL588-R593): Removed redundant change detection logic and replaced it with a call to the new `check_for_changes` method.
* [`src/bootstrap/src/core/config/config.rs`](diffhunk://#diff-5f5330cfcdb0a89b85ac3547b761c3a45c2534a85c4aaae8fea88c711a7a65b2R2837-R2872): Added a new method `check_for_changes` to centralize the logic for detecting changes in specified directories since a given commit.
* [`src/bootstrap/src/core/config/config.rs`](diffhunk://#diff-5f5330cfcdb0a89b85ac3547b761c3a45c2534a85c4aaae8fea88c711a7a65b2L2728-R2740): Updated the existing change detection code to use the new `check_for_changes` method.

Cleanup:

* [`src/bootstrap/src/core/build_steps/tool.rs`](diffhunk://#diff-dc86e288bcf7b3ca3f8c127d3568fbafc785704883bc7fc336bd185910aed5daL13-R13): Removed the unused import `git` from the helpers module.

   r? ``@AlbertLarsan68``
2024-10-23 17:24:30 +02:00
Michael Goulet
21d95fb7b2 More compare_impl_item simplifications 2024-10-23 14:33:44 +00:00
July Tikhonov
b515bbfb85 fix a typo in documentation of pointer::sub_ptr() 2024-10-23 19:37:51 +06:00
July Tikhonov
f4c8ff33de fix documentation of ptr::dangling() function 2024-10-23 19:17:36 +06:00
bors
be01dabfef Auto merge of #132027 - RalfJung:lang-feature-bool-fields, r=nnethercote
nightly feature tracking: get rid of the per-feature bool fields

The `struct Features` that tracks which features are enabled has a ton of public `bool`-typed fields that are basically caching the result of looking up the corresponding feature in `enabled_lang_features`. Having public fields with an invariant is not great, so at least they should be made private. However, it turns out caching these lookups is actually [not worth it](https://github.com/rust-lang/rust/pull/131321#issuecomment-2402068336), so this PR just entirely gets rid of these fields. (The alternative would be to make them private and have a method for each of them to expose them in a read-only way. Most of the diff of this PR would be the same in that case.)

r? `@nnethercote`
2024-10-23 12:16:41 +00:00
DianQK
6570a6fe92
Add a test case for #131164 2024-10-23 19:01:38 +08:00
Josh Triplett
ecdc2441b6 "innermost", "outermost", "leftmost", and "rightmost" don't need hyphens
These are all standard dictionary words and don't require hyphenation.
2024-10-23 02:45:24 -07:00
Adrian Taylor
2eb7e0d370 CI: rfl: use rust-next temporary commit
Commit c95bbb59a9b22f9b838b15d28319185c1c884329 within rust-next
contains some changes required to be compatible with upcoming arbitraty
self types work. Roll RFL CI forward to the latest rust-next to include
that work.

Related:
https://github.com/rust-lang/rust/pull/130225
https://github.com/rust-lang/rust/issues/44874
2024-10-23 09:31:43 +00:00
guliwa
1b5921641a
Refactor change detection for rustdoc and download-rustc 2024-10-23 09:30:00 +00:00
bors
ffd978b7bf Auto merge of #132044 - lcnr:no-relate-abi, r=compiler-errors
do not implement `Relate`  for "boring" types

and update some macros while we're at it. This means we don't have to implement `TypeVisitable` for them.

r? `@compiler-errors`
2024-10-23 08:41:24 +00:00
Ralf Jung
44638853f5 rename lang feature lists to include LANG 2024-10-23 09:14:43 +01:00
Ralf Jung
e82bca6f32 remove no longer needd UnstableFeature type 2024-10-23 09:14:43 +01:00
Ralf Jung
6ad17bd30c get rid of feature list in target feature logic 2024-10-23 09:14:43 +01:00
Ralf Jung
7340b9c7c2 rustc_feature: remove no-longer-needed macro 2024-10-23 09:14:42 +01:00
Ralf Jung
ad3991d303 nightly feature tracking: get rid of the per-feature bool fields 2024-10-23 09:14:41 +01:00
Benoît du Garreau
77a7164ec9 Specialize read_exact and read_buf_exact for VecDeque 2024-10-23 10:09:24 +02:00
Graydon Hoare
b0f02823fa
More review comments on wasm32v1-none target 2024-10-22 23:04:45 -07:00
Graydon Hoare
3ba87498fa
Fix rustc_target test: wasmNN-none should support dynamic linking 2024-10-22 23:04:44 -07:00
Graydon Hoare
212d516ab0
Address review comments on wasm32v1-none target 2024-10-22 23:04:44 -07:00
Graydon Hoare
e14d6d8314
Add wasm32v1-none target (compiler-team/#791) 2024-10-22 23:04:44 -07:00
bors
9abfcb4900 Auto merge of #132053 - matthiaskrgr:rollup-u5ds6i3, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #131707 (Run most `core::num` tests in const context too)
 - #132002 (abi/compatibility: also test Option-like types)
 - #132026 (analyse: remove unused uncanonicalized field)
 - #132031 (Optimize `Rc<T>::default`)
 - #132040 (relnotes: fix stabilizations of `assume_init`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-10-23 05:57:00 +00:00
onur-ozkan
47d6667454 do not remove .cargo directroy
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-23 08:56:54 +03:00
Matthias Krüger
b44a0fa61c
Rollup merge of #132040 - cuviper:assume_init-1.82, r=dtolnay
relnotes: fix stabilizations of `assume_init`

Ref: https://github.com/rust-lang/blog.rust-lang.org/pull/1416
2024-10-23 06:51:25 +02:00
Matthias Krüger
af356d6d73
Rollup merge of #132031 - slanterns:rc_default, r=ibraheemdev
Optimize `Rc<T>::default`

The missing piece of https://github.com/rust-lang/rust/pull/131460.

Also refactored `Arc<T>::default` by using a safe `NonNull::from(Box::leak(_))` to replace the unnecessarily unsafe call to `NonNull::new_unchecked(Box::into_raw(_))`. The remaining unsafety is coming from `[Rc|Arc]::from_inner`, which is safe from the construction of `[Rc|Arc]Inner`.
2024-10-23 06:51:25 +02:00
Matthias Krüger
5b602201ed
Rollup merge of #132026 - lcnr:stabilize-coherence-again, r=compiler-errors
analyse: remove unused uncanonicalized field

This field is unused and was only relevant when actually printing proof trees. Right now this simply causes proof tree building to leak a bunch of inference vars 😁

r? ``@compiler-errors``
2024-10-23 06:51:24 +02:00
Matthias Krüger
7e1dbaec13
Rollup merge of #132002 - RalfJung:abi-compat-option-like, r=compiler-errors
abi/compatibility: also test Option-like types

Adds tests for the decision [here](https://github.com/rust-lang/rust/pull/130628#issuecomment-2402761599).

Cc ``@workingjubilee``
2024-10-23 06:51:24 +02:00
Matthias Krüger
38eaf608eb
Rollup merge of #131707 - clarfonthey:constify-core-tests, r=thomcc
Run most `core::num` tests in const context too

This adds some infrastructure for something I was going to use in #131566, but it felt worthwhile enough on its own to merge/discuss separately.

Essentially, right now we tend to rely on UI tests to ensure that things work in const context, rather than just using library tests. This uses a few simple macro tricks to make it *relatively* painless to execute tests in both runtime and compile-time context. And this only applies to the numeric tests, and not anything else.

Recommended to review without whitespace in the diff.

cc `@RalfJung`
2024-10-23 06:51:23 +02:00
bors
e1f3068995 Auto merge of #131982 - compiler-errors:split-trait-bound-modifiers, r=fmease
Represent `hir::TraitBoundModifiers` as distinct parts in HIR

Stop squashing distinct `polarity` and `constness` into a single `hir::TraitBoundModifier`.

This PR doesn't attempt to handle all the corner cases correctly, since the old code certainly did not either; but it should be much easier for, e.g., rustc devs working on diagnostics, or clippy devs, to actually handle constness and polarity correctly.

try-job: x86_64-gnu-stable
2024-10-23 03:31:17 +00:00
Asuna
57bffe1d59 Set signext or zeroext for integer arguments on LoongArch64 2024-10-23 04:42:21 +02:00
Asuna
6b65524620 Set signext or zeroext for integer arguments on RISC-V 2024-10-23 04:42:03 +02:00
Asuna
03df13b70d Introduce adjust_for_rust_abi in rustc_target 2024-10-23 03:21:59 +02:00
bors
b13176595d Auto merge of #131929 - LaihoE:replace_default_capacity, r=joboet
better default capacity for str::replace

Adds smarter capacity for str::replace in cases where we know that the output will be at least as long as the original string.
2024-10-23 01:03:48 +00:00
Henry Jiang
8ca39104f1 AIX use /dev/urandom for impl 2024-10-22 20:18:11 -04:00
lcnr
00266eeaa5 remove PredicatePolarity and BoundConstness relate impls
Also removes `TypeError::ConstnessMismatch`. It is unused.
2024-10-23 00:52:37 +02:00
bors
8bf64f106a Auto merge of #131871 - RalfJung:x86-32-float, r=workingjubilee
x86-32 float return for 'Rust' ABI: treat all float types consistently

This helps with https://github.com/rust-lang/rust/issues/131819: for our own ABI on x86-32, we want to *never* use the float registers. The previous logic only considered F32 and F64, but skipped F16 and F128. So I made the logic just apply to all float types.

try-job: i686-gnu
try-job: i686-gnu-nopt
2024-10-22 22:36:59 +00:00
lcnr
196fdf144f do not relate Abi and Safety
and update some macros while we're at it
2024-10-22 23:13:04 +02:00
Michael Goulet
1b7a91ed71 Deduplicate handling of early-bound params in RTN 2024-10-22 19:58:15 +00:00
Michael Goulet
0b52ec3d7e Simplify confusing ResolvedArg constructors 2024-10-22 19:57:58 +00:00
Michael Goulet
febb3f7c88 Represent TraitBoundModifiers as distinct parts in HIR 2024-10-22 19:48:44 +00:00
Josh Stone
1909668a88 relnotes: fix stabilizations of assume_init
Ref: https://github.com/rust-lang/blog.rust-lang.org/pull/1416
2024-10-22 10:47:42 -07:00
Orion Gonzalez
28095bc541 real default value 2024-10-22 19:11:46 +02:00
Orion Gonzalez
c8de61b50d s/display-diff-tool/compiletest-diff-tool/ 2024-10-22 19:11:44 +02:00
Orion Gonzalez
37ffb94093 update CONFIG_CHANGE_HISTORY 2024-10-22 19:11:05 +02:00
Orion Gonzalez
ef4325eb85 implemented custom differ 2024-10-22 19:10:35 +02:00
Orion Gonzalez
73238301f4 add an option for a custom differ 2024-10-22 19:08:55 +02:00
Laiho
c8391802af better default capacity for str::replace 2024-10-22 19:53:33 +03:00