Commit Graph

311864 Commits

Author SHA1 Message Date
Stuart Cook 28fae11eba Rollup merge of #149394 - Aditya-PS-05:test-issue-146445-guard-patterns-liveness, r=Kivooeo
add regression test for guard patterns liveness ICE

closes rust-lang/rust#146445
2025-11-28 15:30:45 +11:00
Stuart Cook 145c81d872 Rollup merge of #149380 - JonathanBrouwer:cfg_select_lints, r=Urgau
Run `eval_config_entry` on all branches so we always emit lints

Fixes https://github.com/rust-lang/rust/issues/149090

Ideally I'd have liked to fix this issue using https://github.com/rust-lang/rust/pull/149215, and this is still the long term plan, but this is slightly more annoying to implement than I'd have liked to, and this is also a nice and easy solution to the problem.

r? `@tgross35`
2025-11-28 15:30:45 +11:00
Stuart Cook b8b7041e6c Rollup merge of #149323 - bjorn3:miri_llvm_target_config, r=RalfJung
Use cg_llvm's target_config in miri

Fixes https://github.com/rust-lang/rust/issues/149314

r? `@RalfJung`
2025-11-28 15:30:44 +11:00
Stuart Cook 6197b5be4c Rollup merge of #149107 - Enselic:option-inspect-mutation, r=jieyouxu
rustc_borrowck: Don't suggest changing closure param type not under user control

This changes output of a handful of tests more than the one added in the first commit, but as far as I can tell, all removed suggestions were invalid.

Closes rust-lang/rust#128381 which is **D-invalid-suggestion** with two 👍-votes.
2025-11-28 15:30:43 +11:00
Stuart Cook 549c577c2a Rollup merge of #149087 - nxsaken:unchecked_neg_shifts_stabilize, r=Amanieu
Stabilize `unchecked_neg` and `unchecked_shifts`

Features: `unchecked_neg`, `unchecked_shifts`
Tracking issue: rust-lang/rust#85122

r? `@Amanieu`
2025-11-28 15:30:43 +11:00
bors e6edf3ae53 Auto merge of #147498 - ferrocene:pvdrz/edition-range-gating, r=jieyouxu,fmease
Gate tests with the right edition

This PR guarantees that `./x test --test-args="--edition XXXX" ui` runs correctly with the 2015, 2018 and 2021 editions.

I don't expect this PR to hold up over time but it helps to submit further updates to the `//@ edition` directives of tests where we can use the new range syntax to have a more robust testing across different editions

r? `@fmease`

---

try-job: aarch64-gnu
try-job: aarch64-apple
try-job: x86_64-msvc-1
try-job: i686-msvc-1
try-job: x86_64-mingw-1
try-job: test-various
try-job: armhf-gnu
2025-11-27 22:37:05 +00:00
Jonathan Brouwer 41900f8bea Add regression test 2025-11-27 23:02:01 +01:00
bjorn3 57b57b8b56 Improve test 2025-11-27 19:30:17 +00:00
bors c86564c412 Auto merge of #149397 - matthiaskrgr:rollup-go79y6a, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#147071 (constify from_fn, try_from_fn, try_map, map)
 - rust-lang/rust#148930 (tweak editor configs)
 - rust-lang/rust#149320 (-Znext-solver: normalize expected function input types when fudging)
 - rust-lang/rust#149363 (Port the `#![windows_subsystem]` attribute to the new attribute system)
 - rust-lang/rust#149378 (make run-make tests use 2024 edition by default)
 - rust-lang/rust#149381 (Add `impl TrustedLen` on `BTree{Map,Set}` iterators)
 - rust-lang/rust#149388 (remove session+blob decoder construction)
 - rust-lang/rust#149390 (`rust-analyzer` subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-27 19:24:40 +00:00
Christian Poveda 7ae2823bc6 Gate 2018 UI tests 2025-11-27 14:13:58 -05:00
Ralf Jung d3901cd6ff simplify and explain MiriBeRustCompilerCalls logic for crate types 2025-11-27 19:12:18 +00:00
bjorn3 99649708fe Use cg_llvm's target_config in miri 2025-11-27 19:12:18 +00:00
Matthias Krüger b2f8c16931 Rollup merge of #149390 - lnicola:sync-from-ra, r=lnicola
`rust-analyzer` subtree update

Subtree update of `rust-analyzer` to https://github.com/rust-lang/rust-analyzer/commit/a2a4a9525a44d955613e83a0f8707c7dc46ea855.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-11-27 20:07:16 +01:00
Matthias Krüger 4912d12efc Rollup merge of #149388 - jdonszelmann:rm-sess-blob, r=jieyouxu
remove session+blob decoder construction

turns out, we only did that in one place and we didn't need it.... Working on ways to make this statically known in the future. For now just a smol deletion :3
2025-11-27 20:07:15 +01:00
Matthias Krüger 66c0e1c06a Rollup merge of #149381 - yotamofek:pr/library/btree-iter-trustedlen, r=Amanieu
Add `impl TrustedLen` on `BTree{Map,Set}` iterators

https://github.com/rust-lang/rust/pull/149125#issuecomment-3556865052

r? `@Amanieu` , or re-assign
2025-11-27 20:07:15 +01:00
Matthias Krüger c83f8b6973 Rollup merge of #149378 - tshepang:patch-2, r=clubby789
make run-make tests use 2024 edition by default

compiler/ and library/ use 2024 edition, so I thought why not run-make also
2025-11-27 20:07:14 +01:00
Matthias Krüger 267fe55de4 Rollup merge of #149363 - scrabsha:rust/sasha/vkknqylzvzlu, r=jdonszelmann
Port the `#![windows_subsystem]` attribute to the new attribute system

Part of rust-lang/rust#131229.

I think it's worth running the Windows test suite before merging that (I don't have the rights for this).
2025-11-27 20:07:13 +01:00
Matthias Krüger 12d720261f Rollup merge of #149320 - ShoyuVanilla:normalized-fudge, r=lcnr
-Znext-solver: normalize expected function input types when fudging

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/252

r? lcnr
2025-11-27 20:07:11 +01:00
Matthias Krüger 725d8bdb11 Rollup merge of #148930 - WaffleLapkin:config-tweaks2, r=mati865
tweak editor configs

r? mati865
2025-11-27 20:07:11 +01:00
Matthias Krüger b1b3e5e5e9 Rollup merge of #147071 - bend-n:const_array-ops, r=oli-obk
constify from_fn, try_from_fn, try_map, map

adds the `const_array` feature
reimplements `try_map` in more or less the same way
2025-11-27 20:07:10 +01:00
Aditya-PS-05 2425f8021d add regression test for guard patterns liveness ICE 2025-11-27 23:06:05 +05:30
Christian Poveda b2ab7cf980 Gate 2015 UI tests 2025-11-27 11:19:00 -05:00
bors f392ed53ca Auto merge of #149387 - matthiaskrgr:rollup-hkkht91, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#148256 (remove support for `typeof`)
 - rust-lang/rust#148589 (Rename `DropGuard::into_inner` to `DropGuard::dismiss`)
 - rust-lang/rust#149001 (Fix false positive of "multiple different versions of crate X in the dependency graph")
 - rust-lang/rust#149334 (fix ICE: rustdoc: const parameter types cannot be generic rust-lang/rust#149288)
 - rust-lang/rust#149345 (Deeply normalize param env in `compare_impl_item` if using the next solver)
 - rust-lang/rust#149367 (Tidying up UI tests [4/N])

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-27 16:11:11 +00:00
Lukas Wirth ac118f93ff Merge pull request #21146 from Veykril/push-kwupvlsnstrx
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl rendering puncts as u8
2025-11-27 15:59:08 +00:00
Lukas Wirth 6bbdb1f6ae proc-macro-srv: Fix <TokenStream as Display>::fmt impl rendering puncts as u8 2025-11-27 16:49:38 +01:00
Shoyu Vanilla 9f584ffad0 Mention issue 149379 and add tests for it 2025-11-28 00:24:59 +09:00
Shoyu Vanilla 19f7faa648 -Znext-solver: normalize expected function input types when fudging 2025-11-28 00:24:57 +09:00
Waffle Lapkin bea0d6844d update editor config hashes 2025-11-27 16:10:49 +01:00
Jana Dönszelmann e399091785 remove session+blob decoder construction 2025-11-27 16:01:56 +01:00
Waffle Lapkin dd58ee3ddb synchronize helix/zed/vscode settings 2025-11-27 16:01:47 +01:00
Matthias Krüger 01512aa08a Rollup merge of #149367 - reddevilmidzy:t4, r=Kivooeo
Tidying up UI tests [4/N]

> [!NOTE]
> Intermediate commits are intended to help review, but will be squashed prior to merge.

part of rust-lang/rust#133895

Relocate 4 tests in fn-main and issues and remove fn-main directory

r? Kivooeo
2025-11-27 15:59:15 +01:00
Matthias Krüger a8cf0c7080 Rollup merge of #149345 - adwinwhite:next-166, r=lcnr
Deeply normalize param env in `compare_impl_item` if using the next solver

Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/166.

Duplicated the `normalize_param_env_or_error` function to force deep normalization for `compare_impl_item`.

r? `@lcnr`
2025-11-27 15:59:14 +01:00
Matthias Krüger 9320a7d175 Rollup merge of #149334 - asukaminato0721:149288, r=notriddle
fix ICE: rustdoc: const parameter types cannot be generic #149288

fix rust-lang/rust#149288

Applied the patch.
2025-11-27 15:59:13 +01:00
Matthias Krüger 7be6ada867 Rollup merge of #149001 - rperier:untruthful_multiple_different_versions_of_crate, r=lcnr
Fix false positive of "multiple different versions of crate X in the dependency graph"

cc rust-lang/rust#148892
2025-11-27 15:59:12 +01:00
Matthias Krüger cdb678c165 Rollup merge of #148589 - yoshuawuyts:DropGuard-dismiss, r=joshtriplett
Rename `DropGuard::into_inner` to `DropGuard::dismiss`

Tracking issue: https://github.com/rust-lang/rust/issues/144426

One of the open questions blocking the stabilization of `DropGuard` is what to name the associated method that prevents the destructor from running, and returns the captured value. This method is currently called `into_inner`, but most people (including myself) feel like this would benefit from a method that calls more attention to itself.

This PR proposes naming this method `dismiss`, after the Linux kernel's [`ScopeGuard::dismiss`](https://rust.docs.kernel.org/kernel/types/struct.ScopeGuard.html#method.dismiss). Which crucially does not evoke images of violence or weaponry the way alternatives such as "disarm" or "defuse" do. And personally I enjoy the visual metaphor of "dismissing a guard" (e.g. a person keeping watch over something) - a job well done, they're free to go.

This PR also changes the signature from an static method to an instance method. This also matches the Linux kernel's API, and seems alright since `dismiss` is not nearly as ubiquitous as `into_inner`. This makes it more convenient to use, with a much lower risk of conflicting. Though in the rare case there might be ambiguity, the explicit notation is available as a fallback.

```rust
let x = DropGuard::into_inner(guard);  // ← current
let x = guard.dismiss();               // ← proposed
2025-11-27 15:59:11 +01:00
Matthias Krüger d67a12dfff Rollup merge of #148256 - lcnr:orphan-check, r=spastorino,WaffleLapkin
remove support for `typeof`

see https://github.com/rust-lang/compiler-team/issues/940 closes https://github.com/rust-lang/rust/issues/148700

This also enables checks for invariants previously broken by `typeof` again.

r? types
2025-11-27 15:59:11 +01:00
Waffle Lapkin d09726bcf6 tweak helix config 2025-11-27 15:54:53 +01:00
bendn e3a2c23e37 redo the drain 2025-11-27 20:18:13 +07:00
bendn 1d718e20ac constify from_fn, try_from_fn, try_map, map 2025-11-27 20:16:46 +07:00
bendn eddf2f8c68 tests 2025-11-27 20:16:43 +07:00
Lukas Wirth 7f93ba5612 Merge pull request #21145 from Veykril/push-prwwrlwmoxzx
proc-macro-srv: Fix `<TokenStream as Display>::fmt` impl producing trailing whitespace
2025-11-27 13:01:10 +00:00
Lukas Wirth 2578d40f34 proc-macro-srv: Fix <TokenStream as Display>::fmt impl producing trailing whitespace 2025-11-27 13:51:20 +01:00
Yotam Ofek 6d05636645 Add impl TrustedLen on BTree{Map,Set} iterators 2025-11-27 14:48:18 +02:00
Jonathan Brouwer e59a6f89d9 Run eval_config_entry on all branches so we always emit lints 2025-11-27 13:36:03 +01:00
reddevilmidzy a5dc701e74 Relocate some tests and remove fn-main directory
Relocate issues/issue-51022.rs to
entry-point/main-with-lifetime-param.rs

Relocate issue-50714.rs to entry-point/main-where-fn-bound.rs

Rename issue-118772.rs to main-with-invalid-signature.rs and delete
duplicate test

remove ui/entry-point/issue-118772.rs in issues.txt

Relocate fn-main/wrong-location.rs to entry-point/main-in-submodule.rs

Remove fn-main directory

Relocate issue-50688.rs to mismatched_types/array-len-is-closure.rs
2025-11-27 20:11:00 +09:00
bors cf8a95590a Auto merge of #148987 - Zalathar:is-default, r=jieyouxu
bootstrap: Replace `Step::DEFAULT` and `default_condition` with `is_default_step`

- Revised and expanded version of https://github.com/rust-lang/rust/pull/148965

---

One of the confusing things about bootstrap's `Step::should_run` is that it combines two loosely-related but non-overlapping responsibilities:
- Registering paths/aliases to decide whether a step should be run in response to paths/aliases passed as explicit command-line arguments
  - When the user invokes `./x test compiler`, this allows bootstrap to know what steps “compiler” should translate into
- Deciding whether a step marked `DEFAULT = true` should actually run or not, when no paths/aliases are explicitly specified
  - When the user invokes `./x test`, this allows bootstrap to know which steps to run by default

This PR therefore splits out the latter of those responsibilities into a dedicated `is_default_step` associated function, which also replaces the existing `DEFAULT` associated constant.

A small number of steps were using `ShouldRun::lazy_default_condition` to specify a condition that should not be run repeatedly if possible, e.g. because it queries external tools. Those steps now perform memoization via fields in `Builder` instead.

r? jieyouxu
2025-11-27 10:48:11 +00:00
Tshepang Mbambo 71b97d27ca make run-make tests use 2024 edition by default 2025-11-27 12:17:04 +02:00
Adwin White 133d520aaa deeply normalize param env in compare_impl_item 2025-11-27 16:35:05 +08:00
Lukas Wirth 41a2df5b38 Merge pull request #21095 from A4-Tacks/autoderef-skipiter
Fix skipiter not applicable in autoderef
2025-11-27 08:31:19 +00:00
bors 7b9905edb4 Auto merge of #149370 - Zalathar:rollup-6fkk5x4, r=Zalathar
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#149238 (float:🗜️ make treatment of signed zeros unspecified)
 - rust-lang/rust#149270 (implement `Iterator::{exactly_one, collect_array}`)
 - rust-lang/rust#149295 (Suggest _bytes versions of endian-converting methods)
 - rust-lang/rust#149332 (fix rustdoc search says “Consider searching for "null" instead.” rust-lang/rust#149324)
 - rust-lang/rust#149349 (Fix typo in comment.)
 - rust-lang/rust#149353 (Tidying up UI tests [3/N])
 - rust-lang/rust#149355 (Document that `build.description` affects symbol mangling and crate IDs)
 - rust-lang/rust#149360 (Enable CI download for windows-gnullvm)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-27 07:30:25 +00:00