Commit graph

22240 commits

Author SHA1 Message Date
Matthias Krüger
6d4e3f8596
Rollup merge of #149321 - reddevilmidzy:ice, r=petrochenkov
Fix ICE when include_str! reads binary files

ICE occurred when an invalid UTF8 file with an absolute path were included.

resolve: rust-lang/rust#149304
2025-11-28 15:19:15 +01:00
Aditya-PS-05
2b4b02e613 change test location 2025-11-28 18:52:18 +05:30
reddevilmidzy
ace4aebb6d Merge while with for-loop-while 2025-11-28 21:41:03 +09:00
reddevilmidzy
cd618a9ccb Merge missing_non_modrs with modules 2025-11-28 21:40:59 +09:00
reddevilmidzy
aa97acce62 Relocate qualified/qualified-path-params to
typeck/qualified-path-params.rs

merged test removed ui/qualified directory
2025-11-28 21:40:53 +09:00
reddevilmidzy
8e74c6b137 Relocate modules_and_files_visibility/mod_file_disambig.rs to
modules/mod_file_disambig.rs

add

fix
2025-11-28 21:40:35 +09:00
reddevilmidzy
58a802e629 Relocate modules_ans_files_visibity/mod_file_correct_spans.rs to
modules/mod_file_correct_spans.rs
2025-11-28 21:40:14 +09:00
bors
9050733395 Auto merge of #148020 - bjorn3:oom_backtrace, r=Mark-Simulacrum
Show backtrace on allocation failures when possible

And if an allocation while printing the backtrace fails, don't try to print another backtrace as that will never succeed.

Split out of https://github.com/rust-lang/rust/pull/147725 to allow landing this independently of a decision whether or not to remove `-Zoom=panic`.
2025-11-28 12:27:33 +00:00
Aditya-PS-05
57f92698be add test for borrow checker ICE with nested generic closures 2025-11-28 16:31:28 +05:30
bors
d645a4c9c5 Auto merge of #148871 - WaffleLapkin:never-simplifications, r=lcnr
Remove context dependant `!` fallback

... and minor cleanup.

r? lcnr
2025-11-28 09:16:14 +00:00
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
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
reddevilmidzy
bfc0c02043 Relocate macro_backtrace to macro and remove macro_backtrace 2025-11-28 13:12:15 +09:00
reddevilmidzy
3f943fbf84 Fix ICE when include_str! reads absolute path binary files 2025-11-28 12:43:56 +09:00
Orson Peters
ff8ed14a3f Expand test with allocating from thread-local destructors 2025-11-28 00:16:30 +01:00
Orson Peters
750609c0a7 Use System allocator for thread-local storage 2025-11-28 00:09:12 +01: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
Waffle Lapkin
37ecc8e4a6
use a new tracking issue for never type changes 2025-11-27 22:48:00 +01:00
Waffle Lapkin
b48d701f71
remove feature(never_type_fallback) 2025-11-27 22:48:00 +01:00
Aditya-PS-05
3ceea4768b add issue link in test 2025-11-28 02:45:42 +05:30
Aditya-PS-05
b27bb83592 add regression test for align attribute on struct fields 2025-11-28 02:45:42 +05:30
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
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
Aditya-PS-05
2425f8021d add regression test for guard patterns liveness ICE 2025-11-27 23:06:05 +05:30
Tshepang Mbambo
8762fba317
expand valid edition range for use-path-segment-kw.rs 2025-11-27 19:33:29 +02:00
Christian Poveda
b2ab7cf980
Gate 2015 UI tests 2025-11-27 11:19:00 -05: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
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
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
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
bjorn3
16c84f9913 Fix backtrace/line-tables-only.rs test
The content of the baz function has always been on line 5, not line 15.
Presumably it previously accidentally worked as the call in the foo
function is on line 15, but now it likely tail calls to bar.
2025-11-27 10:51:12 +00:00
Adwin White
133d520aaa deeply normalize param env in compare_impl_item 2025-11-27 16:35:05 +08: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
Martin Nordholts
f186e53db9 rustc_borrowck: Don't suggest changing closure param type not under user control
All removed suggestions in tests were invalid.
2025-11-27 06:59:07 +01:00
Martin Nordholts
6004968e4a tests: Check stderr when trying to mutate inside Option::inspect() 2025-11-27 06:08:26 +01:00
Stuart Cook
b89d2546c7
Rollup merge of #149353 - reddevilmidzy:t3, r=Kivooeo
Tidying up UI tests [3/N]

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

part of rust-lang/rust#133895

Relocate 5 tests from tests/ui/issues
2025-11-27 15:47:11 +11:00
Stuart Cook
5d8529467a
Rollup merge of #149332 - asukaminato0721:149324, r=GuillaumeGomez
fix rustdoc search says “Consider searching for "null" instead.” #149324

fix rust-lang/rust#149324

Now builds the “generic parameter” correction banner from discrete sentence fragments and appends the “Consider searching …” clause only when query.proposeCorrectionTo is non-null, so the UI no longer renders null as the suggested type.

Adds a PARSED section with two queries: one typo (Result<SomeTraiz>) that still produces a concrete suggestion and one fully unknown type (Result<NoSuchTrait>) that leaves proposeCorrectionTo null.
2025-11-27 15:47:10 +11:00
Stuart Cook
3a62a46006
Rollup merge of #149270 - jdonszelmann:exact-length-collection, r=Mark-Simulacrum
implement `Iterator::{exactly_one, collect_array}`

As per https://github.com/rust-lang/rust/issues/149266
2025-11-27 15:47:08 +11:00
Stuart Cook
8d6e349108
Rollup merge of #149325 - lolbinarycat:rustdoc-alias-sort-140968, r=GuillaumeGomez
rustdoc: add regression test for #140968

fixes rust-lang/rust#140968
2025-11-27 12:36:55 +11:00
Stuart Cook
39a8f75d4c
Rollup merge of #149190 - zachs18:chilly, r=Mark-Simulacrum
Forbid `CHECK: br` and `CHECK-NOT: br` in codegen tests (suggest `br {{.*}}` instead)

`// CHECK-NOT: br` is fragile to false positives in mangled symbol names, while `// CHECK-NOT: br {{.*}}` is not. Remove and forbid the former in codegen tests, and suggest the latter.

cc https://github.com/rust-lang/rust/pull/149125#issuecomment-3560003847 where this caused a CI failure due to a v0 mangled symbol containing `br` in a disambiguator/crate hash/something.
2025-11-27 12:36:51 +11:00
Stuart Cook
e4cd17cd44
Rollup merge of #148641 - oli-obk:push-olzwqxsmnxmz, r=jackh726
Add a diagnostic attribute for special casing const bound errors for non-const impls

Somewhat of a follow-up to https://github.com/rust-lang/rust/pull/144194

My plan is to resolve

f4e19c6878/compiler/rustc_hir_typeck/src/callee.rs (L907-913)

but doing so without being able to mark impls the way I do in this PR wrould cause all nice diagnostics about for loops and pointer comparisons to just be a `*const u32 does not implement [const] PartialEq` errors.
2025-11-27 12:36:48 +11:00