Commit graph

298901 commits

Author SHA1 Message Date
Jonathan Gruner
1f491dccba add next_index to Enumerate 2025-04-19 12:29:47 +02:00
Ben Kimock
dc58d1e991
Merge pull request #4280 from rust-lang/rustup-2025-04-19
Automatic Rustup
2025-04-19 09:58:15 +00:00
Ralf Jung
31cb737dee simd_select_bitmask: the 'padding' bits in the mask are just ignored 2025-04-19 11:22:10 +02:00
yanglsh
c6d76bb69d fix: needless_collect does not consider side effects 2025-04-19 16:45:58 +08:00
yanglsh
86a10f01d1 fix: double_ended_iterator_last FP when iter has side effects 2025-04-19 16:45:58 +08:00
bors
a7c39b6861 Auto merge of #139114 - m-ou-se:super-let-pin, r=davidtwco
Implement `pin!()` using `super let`

Tracking issue for super let: https://github.com/rust-lang/rust/issues/139076

This uses `super let` to implement `pin!()`.

This means we can remove [the hack](https://github.com/rust-lang/rust/pull/138717) we had to put in to fix https://github.com/rust-lang/rust/issues/138596.

It also means we can remove the original hack to make `pin!()` work, which used a questionable public-but-unstable field rather than a proper private field.

While `super let` is still unstable and subject to change, it seems safe to assume that future Rust will always have a way to express `pin!()` in a compatible way, considering `pin!()` is already stable.

It'd help [the experiment](https://github.com/rust-lang/rust/issues/139076) to have `pin!()` use `super let`, so we can get some more experience with it.
2025-04-19 08:01:53 +00:00
Manuel Drehwald
b3739f3c0e Only consider MonoItem::Fn when preventing inlining for autodiff source functions 2025-04-19 03:36:02 -04:00
Scott McMurray
c49ddc0de3 Improve rustdocs on slice_as_chunks methods
Also mention them from `as_flattened(_mut)`.
2025-04-19 00:23:06 -07:00
Spencer
3eaa4b9368 Cleaned up 4 tests in tests/ui/issues 2025-04-19 01:10:26 -06:00
Trevor Gross
b0d6024f20 ci: Update ci/run-docker.sh to match libm
Prepare for having the repositories combined by ensuring EMULATED,
RUST_BACKTRACE, and CI are set or forwarded as applicable. Also
re-indent the file to four spaces and do some reorganization.
2025-04-19 01:04:33 -04:00
The Miri Cronjob Bot
9726e6b468 Merge from rustc 2025-04-19 04:59:50 +00:00
The Miri Cronjob Bot
4b995e72b6 Preparing for merge from rustc 2025-04-19 04:52:37 +00:00
Trevor Gross
01c5888246 ci: Make CI configuration more similar to libm
Apply a handful of changes to reduce the diff between the two:

* Cancel running jobs on new pushes
* Enable log color and backtraces
* Add timeouts
* Specify CI runner versions
* Add an armv7 job
* Replace the name NO_STD with BUILD_ONLY
* Update the extension to the canonical .yaml
* Set AR_ and CC_ environments in docker
* Install requirements to build MPFR
2025-04-18 23:49:29 -04:00
Thalia Archibald
93fa96cfba Use struct update syntax for some TargetOptions 2025-04-18 19:49:23 -07:00
Thalia Archibald
670ff84d1c Handle unsupported fallback 2025-04-18 19:49:23 -07:00
Thalia Archibald
37712cc016 Combine env consts into std::sys::env_consts 2025-04-18 19:17:08 -07:00
Sky
d863f81671
Re-remove AdtFlags::IS_ANONYMOUS 2025-04-18 21:40:53 -04:00
Trevor Gross
92b1e8454d Rename testcrate to builtins-test
The repo will soon have `libm` as a top-level crate, so make it clear
that this is only the test crate for `compiler-builtins`.
2025-04-18 21:14:41 -04:00
Camille GILLOT
d0d3021bf8 Introduce Arena::try_alloc_from_iter. 2025-04-19 01:13:18 +00:00
bors
2ef7858652 Auto merge of #140015 - GuillaumeGomez:subtree-update_cg_gcc_2025-04-18, r=antoyo
Subtree update GCC backend

cc `@antoyo`
2025-04-19 01:12:39 +00:00
Thalia Archibald
e0d9244472 Sort Unix env constants alphabetically by target_os
They were roughly grouped into Linux, Apple, BSD, and everything else,
roughly in alphabetical order. Alphabetically order them to make it
easier to maintain and discard the Unix-specific groups to generalize it
to all platforms.
2025-04-18 16:35:26 -07:00
Camille GILLOT
bd5c43835a Remove early exits from JumpThreading. 2025-04-18 23:34:37 +00:00
Trevor Gross
cd7c76aab3 Migrate all crates except libm to edition 2024
Unfortunately this means we lose use of the convenient name `gen`, so
this includes a handful of renaming.

We can't increase the edition for `libm` yet due to MSRV, but we can
enable `unsafe_op_in_unsafe_fn` to help make that change smoother in the
future.
2025-04-18 19:00:45 -04:00
Alex Macleod
b52bd96713 Replace interning of string literals with preinterned symbols 2025-04-18 22:44:16 +00:00
Guillaume Gomez
e32e494097 Fix import 2025-04-19 00:08:03 +02:00
Guillaume Gomez
cc359b8bb6 Fix import 2025-04-19 00:08:03 +02:00
Folkert de Vries
59c5ed0ba8 Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
Folkert de Vries
41ddf86722
Make #[naked] an unsafe attribute 2025-04-19 00:03:35 +02:00
Trevor Gross
3a0b9c9f51 refactor: Introduce a virtual manifest
Move the workspace configuration to a virtual manifest. This
reorganization makes a more clear separation between package contents
and support files that don't get distributed. It will also make it
easier to merge this repository with `compiler-builtins` which is
planned (builtins had a similar update done in [1]).

LICENSE.txt and README.md are symlinkedinto the new directory to ensure
they get included in the package.

[1]: https://github.com/rust-lang/compiler-builtins/pull/702
2025-04-18 17:49:25 -04:00
Trevor Gross
7077daa6ad refactor: Move the libm crate to a subdirectory
In preparation for switching to a virtual manifest, move the `libm`
crate into a subdirectory and update paths to match.

Updating `Cargo.toml` is done in the next commit so git tracks the moved
file correctly.
2025-04-18 17:49:25 -04:00
Guillaume Gomez
acdd3b729f Fix compilation error in GCC backend 2025-04-18 22:46:43 +02:00
Guillaume Gomez
84f582665e Fix compilation error in GCC backend 2025-04-18 22:46:43 +02:00
Trevor Gross
88dcaf20b5 Mark generic functions #[inline]
Benchmarks for [1] seemed to indicate that repository organization for
some reason had an effect on performance, even though the exact same
rustc commands were running (though some with a different order). After
investigating more, it appears that dependencies may have an affect on
inlining thresholds for generic functions.

It is surprising that this happens, we more or less expect that public
functions will be standalone but everything they call will be inlined.
To help ensure this, mark all generic functions `#[inline]` if they
should be merged into the public function.

Zulip discussion at [2].

[1]: https://github.com/rust-lang/libm/pull/533
[2]: https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Dependencies.20affecting.20codegen/with/513079387
2025-04-18 16:29:27 -04:00
Patrick Mooney
fb3cae08ab std: Use fstatat() on illumos 2025-04-18 14:44:19 -05:00
Guillaume Gomez
4900dd2e5c Fix rustc_codegen_gcc/tests/run/return-tuple.rs test 2025-04-18 21:21:15 +02:00
Guillaume Gomez
c123dc63ea Fix rustc_codegen_gcc/tests/run/return-tuple.rs test 2025-04-18 21:21:15 +02:00
Guillaume Gomez
8f9a32aaf8 Merge commit 'db1a31c243' into subtree-update_cg_gcc_2025-04-18 2025-04-18 21:20:11 +02:00
Guillaume Gomez
e4ea67b3d7 Merge commit 'db1a31c243' into subtree-update_cg_gcc_2025-04-18 2025-04-18 21:20:11 +02:00
Trevor Gross
3cecf22e0c Combine the source files for fmod
Since `fmod` is generic, there isn't any need to have the small wrappers
in separate files. Most operations was done in [1] but `fmod` was
omitted until now.

[1]: https://github.com/rust-lang/libm/pull/537
2025-04-18 15:14:55 -04:00
Lukas Wirth
53bd63400f
Merge pull request #19613 from ChayimFriedman2/subst
fix: Fix a panic when a trait method in an impl declares a lifetime parameter not in the trait declaration
2025-04-18 18:51:14 +00:00
Guillaume Gomez
076016d55a Update rustdoc-json-types FORMAT_VERSION to 45 2025-04-18 20:34:56 +02:00
Guillaume Gomez
ba9a008d90 Add regression test for span 1-indexed check 2025-04-18 20:32:40 +02:00
Guillaume Gomez
59477a8ab2 Make rustdoc JSON Span column 1-based, just like line numbers 2025-04-18 20:32:40 +02:00
onur-ozkan
4ba9fffba5 add regression test for dist compilation
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-04-18 21:04:14 +03:00
antoyo
db1a31c243
Merge pull request #650 from rust-lang/sync_from_rust_2025_04_17
Sync from rust 2025/04/17
2025-04-18 12:43:27 -04:00
Antoni Boucher
52b06872fe Simplify handling of some SIMD intrinsics 2025-04-18 12:07:10 -04:00
Antoni Boucher
98dd5a30b3 Fix for libgccjit 12 2025-04-18 11:45:30 -04:00
Tamir Duberstein
87072c1d2e
Remove errant doc comment lines 2025-04-18 11:25:36 -04:00
Antoni Boucher
65b87aae21 Support new target builtins 2025-04-18 11:21:32 -04:00
Tamir Duberstein
9058bab9a9
Move <CStr as Debug> test to coretests 2025-04-18 10:31:55 -04:00