Commit Graph

303456 Commits

Author SHA1 Message Date
Jakub Beránek 07007135f2 Rollup merge of #144910 - ShoyuVanilla:add-regression-tests, r=fee1-dead
Add regression tests for seemingly fixed issues

Closes rust-lang/rust#104314
Closes rust-lang/rust#125866
2025-08-06 15:55:44 +02:00
Jakub Beránek bde39e58d6 Rollup merge of #144836 - chotchki:patch-1, r=tgross35
Change visibility of Args new function

Currently the Args new function is constrained to pub(super) but this stops me from being able to construct Args structs in unit tests.

This pull request is to change this to pub.
2025-08-06 15:55:44 +02:00
Jakub Beránek 21e488c00a Rollup merge of #144676 - tiif:dev_guide_unstable_bound, r=BoxyUwU
Add documentation for unstable_feature_bound

There is more detail and explanation in https://hackmd.io/``````@tiif/Byd3mq7Ige``````

Original PR that implemented this: rust-lang/rust#140399

r? ``````@BoxyUwU`````` to nominate for types team discussion
2025-08-06 15:55:43 +02:00
Jakub Beránek e89ae47b97 Rollup merge of #144552 - Oneirical:uncountable-integer-3, r=jieyouxu
Rehome 33 `tests/ui/issues/` tests to other subdirectories under `tests/ui/`

rust-lang/rust#143902 divided into smaller, easier to review chunks.

Part of rust-lang/rust#133895

Methodology:

1. Refer to the previously written `tests/ui/SUMMARY.md`
2. Find an appropriate category for the test, using the original issue thread and the test contents.
3. Add the issue URL at the bottom (not at the top, as that would mess up stderr line numbers)
4. Rename the tests to make their purpose clearer

Inspired by the methodology that ``@Kivooeo`` was using.

r? ``@jieyouxu``
2025-08-06 15:55:42 +02:00
Jakub Beránek 057df26bae Remove unneeded stage parameter when setting up stdlib Cargo 2025-08-06 15:20:15 +02:00
xizheyin 6e7b9d5149 Introduce ModernIdent type to unify macro 2.0 hygiene handling
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-08-06 21:19:09 +08:00
Boxy 351e4bd106 handle bootstrap cfgs 2025-08-06 14:14:44 +01:00
bors 8fb40f798a Auto merge of #143679 - sebastianpoeplau:preserve-debug-gdb-scripts-section, r=bjorn3
Preserve the .debug_gdb_scripts section

Make sure that compiler and linker don't optimize the section's contents
away by adding the global holding the data to `llvm.used`. This
eliminates the need for a volatile load in the main shim; since the LLVM
codegen backend is the only implementer of the corresponding trait
function, remove it entirely.

Pretty printers in dylib dependencies are now emitted by the main crate
instead of the dylib; apart from matching how rlibs are handled, this
approach has the advantage that `omit_gdb_pretty_printer_section` keeps
working with dylib dependencies.

r? `@bjorn3`
2025-08-06 13:02:36 +00:00
Boxy 607133bed2 Add a few missed entries 2025-08-06 13:57:36 +01:00
llogiq d98d7c0ee8 Fix suggestion for collapsible_if and collapsible_else_if when the inner if is enclosed in parentheses (#15304)
changelog: [`collapsible_else_if`]: fix suggestion when inner `if` as
wrapped in parentheses
changelog: [`collapsible_if`]: fix suggestion when inner `if` as wrapped
in parentheses

fixes https://github.com/rust-lang/rust-clippy/issues/15303

I'm sure this is a bit dirty, but don't currently see a better way.
2025-08-06 12:45:27 +00:00
dianqk d55cc9a9bd mir: Do not modify NonUse in super_projection_elem 2025-08-06 20:41:39 +08:00
Jana Dönszelmann 4a2ef3c1c8 Merge pull request #2537 from jdonszelmann/wasi
Add instructions to test wasi (wasm32-wasip1) specific tests
2025-08-06 14:41:34 +02:00
Jana Dönszelmann c3ee403322 add note on how to build wasi 2025-08-06 14:40:25 +02:00
Zalathar 81ed042c8c coverage: Remove all unstable support for MC/DC instrumentation 2025-08-06 22:38:52 +10:00
dianqk 2909de557c simplifycfg: Mark as changed when start is modified in collapse goto chain 2025-08-06 20:26:10 +08:00
Boxy 21086317c1 bump stage0 2025-08-06 13:22:38 +01:00
Boxy 9ccc9f177e replace version placeholder 2025-08-06 13:22:38 +01:00
Sebastian Poeplau b4d923cea0 Embed GDB pretty printers in rlibs and dylibs
Instead of collecting pretty printers transitively when building
executables/staticlibs/cdylibs, let the debugger find each crate's
pretty printers via its .debug_gdb_scripts section. This covers the case
where libraries defining custom pretty printers are loaded dynamically.
2025-08-06 13:24:43 +02:00
bit-aloo 962836dfd3 remove redundant _toml suffix and other misc changes 2025-08-06 15:50:27 +05:30
Guillaume Gomez 102e39fa51 Remove CSS bootstrap dependency 2025-08-06 11:46:53 +02:00
Guillaume Gomez 04e794a0b9 Fix CSS indent 2025-08-06 11:30:09 +02:00
Amanda Stjerna bcefc2ee97 Add annotations to the graphviz region graph on region origins
This adds
- (ex) for regions whose origin is existential,
- (p) for regoins whose origin is a placeholder, and
- (p for <name>) if the originating placeholder is named.

This has helped _my_ debugging and it doesn't create too bad clutter, I feel.

The change is ridiculously small, but I turned it into a separate PR so we can bikeshed the format.
2025-08-06 11:12:51 +02:00
Philipp Krones 7673826138 expand the issue template for new lints (#15336)
When I first tried contributing to clippy,
I encountered the problem that a lot of lint suggestions overlapped with
existing lints, so I would spend a bunch of time implementing something
only to figure out it wasn't actually needed.

The "comparison with existing lints" field should hopefully reduce this
somewhat, while not incresing the burden of
requesting a new lint too much due to not being mandatory.

changelog: none
2025-08-06 09:03:10 +00:00
bors dc0bae1db7 Auto merge of #143684 - nikic:llvm-21, r=cuviper
Update to LLVM 21

Timeline: LLVM 21.1.0 is scheduled to release on Aug 26th. Rust 1.90 branches on Aug 1st and releases September 18.

Depends on:
 * [x] https://github.com/llvm/llvm-project/issues/147781
 * [x] https://github.com/llvm/llvm-project/issues/147935
 * [x] https://github.com/llvm/llvm-project/issues/139443
 * [x] https://github.com/llvm/llvm-project/pull/148207
 * [x] https://github.com/llvm/llvm-project/pull/148607
 * [x] https://github.com/llvm/llvm-project/pull/149046
 * [x] https://github.com/llvm/llvm-project/issues/149097
 * [x] https://github.com/rust-lang/rust/pull/144116

r? `@ghost`
2025-08-06 04:36:54 +00:00
Nicholas Nethercote 42a1042f9b Rename some PrettyPrinter methods.
More consistency.
2025-08-06 12:58:23 +10:00
Nicholas Nethercote b8adda6194 Rename some Printer methods.
I find these name clearer, and starting them all with `print_` makes
things more consistent.
2025-08-06 12:58:20 +10:00
Zalathar f96fbb214b run-make: Allow blessing snapshot files that don't exist yet
This makes it possible to bless the snapshot files used by `diff()` in
newly-created run-make tests, without having to create the files manually
beforehand.
2025-08-06 11:17:56 +10:00
Nicholas Nethercote 69bcd79ab7 Move should_truncate from trait Printer to sub-trait PrettyPrinter.
It's not used in `Printer`.
2025-08-06 10:08:43 +10:00
Nicholas Nethercote dfd38f0d36 Add comments to Printer.
These details took me some time to work out.
2025-08-06 10:08:41 +10:00
Eric Huss 2cd5b4928d Fix some doc links for intrinsics
This fixes a few intrinsic docs that had a link directly to itself
instead of to the correct function in the `mem` module.
2025-08-05 17:02:01 -07:00
León Orell Valerian Liehr 02ea38cfff Fortify generic param default checks 2025-08-06 01:26:26 +02:00
Alejandra González 03ae8b0464 Do not lint for wildcard_imports in external macro (#15413)
Fixes rust-lang/rust-clippy#15412

changelog: [`wildcard_imports`]: do not lint code coming from an
external macro
2025-08-05 22:32:08 +00:00
Josh Triplett a99860b13a File::set_times: Add documentation about setting directory timestamps
Inspired by https://github.com/rust-lang/rust/issues/123883 .
2025-08-05 15:10:24 -07:00
Josh Triplett 1bb14a8bb7 File::set_times: Remove write(true) from the example so it works on directories
Inspired by https://github.com/rust-lang/rust/issues/123883 .
2025-08-05 15:09:33 -07:00
Trevor Gross fbc700f92b configure: Use CARGO_CFG_*_{F16,F128} rather than invoking rustc
Currently we run the `rustc` from the `RUSTC` environment variable to
figure out whether or not to enable `f16` and `f128`, based on the
`target_has_reliable_{f16,f128}` config. However, this does not know
about the codegen backend used, and the backend isn't trivial to check
in a build script (usually it gets set via `RUSTFLAGS`).

It turns out we don't actually need to run `rustc` here: Cargo
unconditionally emits all config from the relevant compiler as
`CARGO_CFG_*` variables, regardless of whether or not they are known
options. Switch to checking these for setting config rather than
invoking `rustc`.

As an added advantage, this will work with target.json files without any
special handling.

Fixes: ed17b95715dd ("Use the compiler to determine whether or not to enable `f16` and `f128`")
2025-08-05 21:17:03 +00:00
Manuel Drehwald dfec44905c Merge pull request #2534 from skrobchik/patch-1
Update installation.md
2025-08-05 14:14:30 -07:00
The 8472 d8e8a5e8b4 add code example showing that file_prefix treats dotfiles as the name of a file, not an extension 2025-08-05 22:56:43 +02:00
okaneco eee6f804a9 Renamed isolate_most_least_significant_one functions
libs-api has agreed to rename these functions to
`isolate_highest_one`/`isolate_lowest_one`
2025-08-05 16:37:04 -04:00
binarycat 34b358d52a rustdoc: fix caching of intra-doc links on reexports 2025-08-05 15:34:51 -05:00
Jens Reidel 070425e54d Add aarch64_be-unknown-none-softfloat target
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2025-08-05 21:18:18 +02:00
Chai T. Rex d811581ba7 Add std::ascii::Char MIN and MAX constants 2025-08-05 15:03:11 -04:00
Chai T. Rex 9a1d38047f Add u8-as-ASCII methods to core::ascii::Char 2025-08-05 15:02:41 -04:00
bors ec7c026125 Auto merge of #144863 - cjgillot:live-or-dead, r=Urgau
Simplify dead code lint

This PR scratches a few itches I had when looking at that code.

The perf improvement comes from keeping the `scanned` set through several marking phases. This pretty much divides by 2 the number of HIR traversals.
2025-08-05 18:10:21 +00:00
Michael Tautschnig 9c0cfd262f Fix description of unsigned checked_exact_div
Like its signed counterpart, this function does not panic. Also, fix the
examples to document how it returns Some/None.
2025-08-05 17:33:04 +00:00
Paul Murphy 6936bb975a Dynamically enable LSE for aarch64 rust provided intrinsics
Create a private module to hold the bootstrap code needed enable LSE
at startup on aarch64-*-linux-* targets when rust implements the
intrinsics.

This is a bit more heavyweight than compiler-rt's LSE initialization,
but has the benefit of initializing the aarch64 cpu feature detection
for other uses.

Using the rust initialization code does use some atomic operations,
that's OK. Mixing LSE and non-LSE operations should work while the
update flag propagates.
2025-08-05 10:35:13 -05:00
Paul Murphy 3b50253b57 compiler-builtins: plumb LSE support for aarch64 on linux
Add dynamic support for aarch64 LSE atomic ops on linux targets
when optimized-compiler-builtins is not enabled.

A hook, __enable_rust_lse, is provided for the runtime to enable
them if available. A future patch will use this to enable them
if available.

The resulting asm should exactly match that of LLVM's compiler-rt
builtins, though the symbol naming for the support function and
global does not.
2025-08-05 10:30:38 -05:00
Ross MacArthur b038197b16 Stabilize core::iter::chain 2025-08-05 17:05:23 +02:00
Kivooeo b6e13e3591 comments 2025-08-05 19:34:46 +05:00
Kivooeo 62c92f30cf moved 35 tests to organized locations 2025-08-05 19:02:23 +05:00
Nikita Popov e6c0e63bd5 Use runtimes build for host compiler-rt build
The project build for compiler-rt is deprecated.

The runtimes build will use the just-built clang. As such, we
also need to pass --gcc-toolchain to the runtimes build, so that
it can find the GCC installation.
2025-08-05 15:43:51 +02:00