Commit graph

308523 commits

Author SHA1 Message Date
bors
ded5c06cf2 Auto merge of #149758 - BoxyUwU:stable, r=BoxyUwU
[stable] prepare Rust 1.92.0

r? `@ghost`
2025-12-08 12:52:32 +00:00
Boxy Uwu
2f2f518819 bump channel 2025-12-08 10:01:43 +00:00
Boxy Uwu
b7d4f12ec1 add release notes 2025-12-08 10:01:14 +00:00
bors
112a4af313 Auto merge of #149656 - flip1995:clippy-beta-backport, r=Mark-Simulacrum
[beta] Clippy beta backport

All 3 PRs are fixing bugs that were introduced in 1.92 (current beta) and would land on the next stable.

- https://github.com/rust-lang/rust-clippy/pull/16079
- https://github.com/rust-lang/rust-clippy/pull/15984
- https://github.com/rust-lang/rust-clippy/pull/15939

I verified that all of those commits are already synced to `main`.

r? `@Mark-Simulacrum`
2025-12-08 03:19:34 +00:00
bors
5cd7b3150d Auto merge of #149649 - wesleywiser:revert_147793, r=wesleywiser
[beta] Revert "Replace NullOp::SizeOf and NullOp::AlignOf by lang items."

Totally clean revert, tests pass on my local machine.

Fixes rust-lang/rust#149081 on 1.92 beta

cc `@lcnr` `@BoxyUwU` `@jieyouxu` `@cjgillot`
2025-12-05 04:37:58 +00:00
Jason Newcomb
f5e067bb50
fix(double_parens): don't lint in proc-macros (#15939)
Fixes https://github.com/rust-lang/rust-clippy/issues/15852

changelog: [`double_parens`]: don't lint in proc-macros
2025-12-04 20:32:28 +01:00
Samuel Tardieu
25cde47717
Fix replace_box FP when the box is moved (#15984)
Closes rust-lang/rust-clippy#15968

changelog: [`replace_box`] fix FP when the box is moved

r? samueltardieu As you wish

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_SUMMARY_START -->

### Summary Notes

-
[Beta-nomination](https://github.com/rust-lang/rust-clippy/pull/15984#issuecomment-3469127087)
by [samueltardieu](https://github.com/samueltardieu)

*Managed by `@rustbot`—see
[help](https://forge.rust-lang.org/triagebot/note.html) for details*

<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
2025-12-04 20:31:50 +01:00
Jason Newcomb
2a33be7472
Taking a raw pointer on a union field is a safe operation (#16079)
changelog: [`multiple_unsafe_ops_per_block`]: taking a raw pointer on a
union field is a safe operation

Fixes rust-lang/rust-clippy#16076

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_SUMMARY_START -->

### Summary Notes

- [Beta
nomination](https://github.com/rust-lang/rust-clippy/pull/16079#issuecomment-3524699179)
by [samueltardieu](https://github.com/samueltardieu)

*Managed by `@rustbot`—see
[help](https://forge.rust-lang.org/triagebot/note.html) for details*

<!-- TRIAGEBOT_SUMMARY_END -->
<!-- TRIAGEBOT_END -->
2025-12-04 20:31:25 +01:00
Wesley Wiser
9deb2c4c92 Revert "Replace NullOp::SizeOf and NullOp::AlignOf by lang items."
This reverts commit 5dfbf67f94.
2025-12-04 10:49:32 -06:00
bors
ac0aff2115 Auto merge of #149572 - cuviper:beta-next, r=cuviper
[beta] backports

- rustdoc: Use configured target modifiers when collecting doctests rust-lang/rust#148068
- fix(rustdoc): Color doctest errors rust-lang/rust#148834
- Fix the issue of unused assignment from MIR liveness checking rust-lang/rust#149072
- Skip unused variables warning for unreachable code rust-lang/rust#149096
- In `BTreeMap::eq`, do not compare the elements if the sizes are different. rust-lang/rust#149125
- Handle cycles when checking impl candidates for `doc(hidden)` rust-lang/rust#149185
- Generalize branch references rust-lang/rust#148395
  - only the commit updating CI scripts
- Change default branch references rust-lang/rust#148564

r? cuviper
2025-12-03 19:24:47 +00:00
Jakub Beránek
519b57bcb3
Use branch name instead of HEAD when unshallowing 2025-12-03 18:45:45 +01:00
Redddy
fdcfd0559a Rename master branch references to main
(cherry picked from commit 4eb0beb3d9)
2025-12-03 09:44:45 -08:00
Jakub Beránek
a81d13f102 Change default branch to main
(cherry picked from commit bc0126d451)
2025-12-02 16:39:01 -08:00
Jakub Beránek
953e1eaa8a Generalize branch name in scripts
(cherry picked from commit ae830ef494)
2025-12-02 16:18:45 -08:00
Jules Bertholet
b1a2cb2fe0 Handle cycles when checking impl candidates for doc(hidden)
Fixes https://github.com/rust-lang/rust/issues/149092

(cherry picked from commit f580357863)
2025-12-02 16:06:44 -08:00
Zachary S
73018d7670 Add regression test for collections' PartialEq::eq impls not comparing elements if lengths are different.
(cherry picked from commit 907f5c1180)
2025-12-02 15:51:25 -08:00
Zachary S
0f71be4da5 In BTreeMap::eq, do not compare the elements if the sizes are different.
Reverts 68a7c25078 in library/

(cherry picked from commit 4adcdbb58b)
2025-12-02 15:51:25 -08:00
yukang
4bd154fa71 Skip unused variables warning for unreachable code
(cherry picked from commit 2c6b1d3430)
2025-12-02 15:51:18 -08:00
yukang
807097675a fix unused assigment issue for variable with drop, issue 148418
(cherry picked from commit 00f3155794)
2025-12-02 15:51:12 -08:00
yukang
1087de60a9 Fix the issue of unused assignment from MIR liveness checking
(cherry picked from commit 4930d3e612)
2025-12-02 15:51:12 -08:00
Scott Schafer
1c8bd26240 fix(rustdoc): Color doctest errors
(cherry picked from commit c523b65245)
2025-12-02 15:51:07 -08:00
Tomasz Miąsko
7ace3ff5e0 rustdoc: Use configured target modifiers when collecting doctests
To support loading dependencies with target modifiers and avoid ABI
mismatch errors.

(cherry picked from commit accd1fe76c)
2025-12-02 15:50:55 -08:00
bors
f3f12444a0 Auto merge of #148591 - cuviper:beta-next, r=cuviper
[beta] backports

- Enable file locking support in illumos rust-lang/rust#148322
- Fix `wasm_import_module` attribute cross-crate rust-lang/rust#148363

r? cuviper
2025-11-09 05:18:39 +00:00
Alex Crichton
f9466e2c8a Fix wasm_import_module attribute cross-crate
This commit fixes an accidental regression from 144678 where wasm
targets would now accidentally use the wrong import module map for a
symbol causing a symbol to skip mangling. This can result in compilation
failures when symbols are used in cross-crate situations.

Closes 148347

(cherry picked from commit 93fef455de)
2025-11-06 09:51:18 -08:00
Emily Albini
4061cf63d0 enable flock for illumos
(cherry picked from commit 3d9c69b594)
2025-11-06 09:51:13 -08:00
bors
0a411606e9 Auto merge of #148310 - cuviper:beta-next, r=cuviper
[beta] Update stage0 to 1.91.0

https://forge.rust-lang.org/release/process.html#beta-stage0-update-friday

r? cuviper
2025-10-31 08:22:08 +00:00
Josh Stone
786168f456 Update stage0 to 1.91.0 2025-10-30 14:07:45 -07:00
bors
3b4dd9bf14 Auto merge of #148181 - cuviper:beta-next, r=cuviper
[beta] Prepare 1.92-beta

- Update CURRENT_RUSTC_VERSION post-bump
- Set channel to beta

r? cuviper
2025-10-28 06:36:06 +00:00
Josh Stone
6284cb18d4 Set channel to beta 2025-10-27 10:27:32 -07:00
Josh Stone
813072186c Update CURRENT_RUSTC_VERSION post-bump 2025-10-27 10:27:05 -07:00
bors
f435972085 Auto merge of #142712 - davidtwco:sized-hierarchy-missing-default-bounds, r=lcnr
hir_analysis: add missing sizedness bounds

Depends on rust-lang/rust#144064

Default sizedness bounds were not being added to `explicit_super_predicates_of` and `explicit_implied_predicates_of` which meant that a trait bound added to a associated type projection would be missing the implied predicate of the default sizedness supertrait of that trait.

An unexpected consequence of this change was that the check for multiple principals was now finding an additional `MetaSized` principal when eagerly expanding trait aliases - which is fixed by skipping `MetaSized` when elaborating trait aliases in lowering `dyn TraitAlias`.
2025-10-24 21:39:28 +00:00
bors
2aaa62b89d Auto merge of #148018 - tardyp:lto_big_filesize_utf8, r=JonathanBrouwer
fix panic when rustc tries to reduce intermediate filenames len with utf8

The issue cannot be reproduced with the former testcase of creating external crates because rust refuses to use "external crate 28_找出字符串中第一个匹配项的下标" because it is not a valid indentifier (starts with number, and contain non ascii chars)

But still using 28_找出字符串中第一个匹配项的下标.rs as a filename is accepted by previous rustc releases So we consider it valid, and add an integration test for it to catch any regression on other code related to non ascii filenames.

Fix rust-lang/rust#147975
2025-10-24 18:23:10 +00:00
David Wood
82a4049844
hir_analysis: add missing sizedness bounds
Default sizedness bounds were not being added to
`explicit_super_predicates_of` and `explicit_implied_predicates_of`
which meant that a trait bound added to a associated type projection
would be missing the implied predicate of the default sizedness
supertrait of that trait.

An unexpected consequence of this change was that the check for multiple
principals was now finding an additional `MetaSized` principal when
eagerly expanding trait aliases. Instead of special-casing trait aliases
as different from traits and not adding a `MetaSized` supertrait to trait
aliases, filter out `MetaSized` when lowering `dyn Trait`.
2025-10-24 15:28:34 +01:00
Pierre Tardy
c6acffeb78 fix panic when rustc tries to reduce intermediate filenames length with multi byte chars
The issue cannot be reproduced with the former testcase of creating external crates because
rust refuses to use "external crate 28_找出字符串中第一个匹配项的下标"
because it is not a valid indentifier (starts with number, and contain non ascii chars)

But still using 28_找出字符串中第一个匹配项的下标.rs as a filename is accepted by previous rustc releases
So we consider it valid, and add an integration test for it to catch any regression on other code related to non ascii filenames.
2025-10-24 16:20:29 +02:00
bors
ab925646fa Auto merge of #147950 - durin42:llvm-22-intrinsics-changes, r=nikic
rustc_codegen_llvm: adapt for LLVM 22 change to pass masked intrinsic alignment as an attribute

This was a bit more invasive than I had kind of hoped. An alternate approach would be to add an extra call_intrinsic_with_attrs() that would have the new-in-this-change signature for call_intrinsic, but this felt about equivalent and made it a little easier to audit the relevant callsites of call_intrinsic().

Related LLVM change is llvm/llvm-project#163802.

`@rustbot` label llvm-main
2025-10-24 13:00:14 +00:00
bors
8aab621cd5 Auto merge of #148043 - lqd:revert-146121, r=wesleywiser
Revert "fix: Filter suggestion parts that match existing code"

As requested by `@wesleywiser` in https://github.com/rust-lang/rust/issues/147973#issuecomment-3437393773 this is a revert of https://github.com/rust-lang/rust/pull/146121 due to the handful of diagnostics ICEs that have been since reported, and found in the beta crater run.

This should thus also be backported to beta so the ICEs don't make it to next week's stable.

Works around (after backport)
- https://github.com/rust-lang/rust/issues/146261
- https://github.com/rust-lang/rust/issues/146706
- https://github.com/rust-lang/rust/issues/146834 but I didn't add a test for this allowed-by-default lint
- as well as the crater run regressions from https://github.com/rust-lang/rust/issues/147973 of which I only added the MCVE as a test.

The proper fix would likely be https://github.com/rust-lang/rust/pull/147849 but it's still currently at the MCP stage. In the meantime, this PR would still emit the same overlapping suggestions, but still use a debug-assert...

r? `@wesleywiser`
2025-10-24 09:50:35 +00:00
bors
75948c8bb3 Auto merge of #148059 - Zalathar:rollup-zkk5prm, r=Zalathar
Rollup of 5 pull requests

Successful merges:

 - rust-lang/rust#148016 (Revert constification of `Borrow` and `Deref for Cow` due to inference failure)
 - rust-lang/rust#148021 ([rustdoc] Simplify module rendering and HTML tags handling)
 - rust-lang/rust#148039 (Add myself to the review rotation)
 - rust-lang/rust#148042 (test(frontmatter): Cover spaces between infostring parts)
 - rust-lang/rust#148054 (Streamline iterator chaining when computing successors.)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-10-24 06:27:11 +00:00
Stuart Cook
7141a0f634
Rollup merge of #148054 - nnethercote:chain, r=saethlin
Streamline iterator chaining when computing successors.

There are numerous unnecessary `into_iter` calls.

Also add a comment explaining why the code looks like this, because it's non-obvious at first glance.

r? `@saethlin`
2025-10-24 14:53:48 +11:00
Stuart Cook
195815583d
Rollup merge of #148042 - epage:info-space, r=Urgau
test(frontmatter): Cover spaces between infostring parts

As these characters are specifically called out in the RFC, I felt it would be important to have a test to cover them.

Tracking issue: rust-lang/rust#136889
2025-10-24 14:53:47 +11:00
Stuart Cook
439d374ef8
Rollup merge of #148039 - JonathanBrouwer:add-myself, r=JonathanBrouwer
Add myself to the review rotation
2025-10-24 14:53:47 +11:00
Stuart Cook
b8ca0d40ff
Rollup merge of #148021 - GuillaumeGomez:simplify-mod-render, r=notriddle
[rustdoc] Simplify module rendering and HTML tags handling

Extracted code from rust-lang/rust#145458.

This PR simplifies the rendering of modules, in particular the HTML tags handling. Instead of having all items in a `vec`, we make a map with their types as key, allowing to then iterate over the types, which allows us to open and close the HTML tag at every turn without the need to check if a tag was opened or not, or to check it's still the same kind of type.

For a better review experience: enable "Hide whitespace", the diff will be much smaller.

r? `@notriddle`
2025-10-24 14:53:46 +11:00
Stuart Cook
3f40ce54a9
Rollup merge of #148016 - clarfonthey:const-convert-revert-2, r=cuviper
Revert constification of `Borrow` and `Deref for Cow` due to inference failure

Reported issue: rust-lang/rust#147964
Original PR: rust-lang/rust#145279
Previous revert: rust-lang/rust#148011
`const Borrow`/`Deref` tracking issue: rust-lang/rust#143773

Should have additional crater run to verify this fixes the issue.

Since other PR is in the queue, this will need to be rebased after that merges. Also will want a beta nomination.
2025-10-24 14:53:45 +11:00
bors
38bc2468de Auto merge of #148049 - cuviper:revert-hash_map, r=Mark-Simulacrum
Revert "feat: implement `hash_map!` macro"

Crater for 1.91-beta found that this unstable macro caused ambiguity in the ecosystem: rust-lang/rust#147971

Since we are very close to release, it's probably best to just revert the macro for now, and re-add it later in a less invasive way -- i.e. not a top-level macro, and not in the prelude until a future edition (as noted [here](https://std-dev-guide.rust-lang.org/breaking-changes/prelude.html#macros)).

`@rustbot` label beta-nominated
2025-10-24 03:21:07 +00:00
ltdk
4a4f3b0e8e Add regression test for inference failures 2025-10-23 18:24:39 -04:00
Rémy Rakic
dd83c57674 add crashes tests for overlapping spans 2025-10-23 22:15:34 +00:00
Nicholas Nethercote
3d951598b2 Streamline iterator chaining when computing successors.
There are numerous unnecessary `into_iter` calls.

Also add a comment explaining why the code looks like this, because it's
non-obvious at first glance.
2025-10-24 08:41:39 +11:00
bors
27050c0d15 Auto merge of #148030 - hkBst:patch-3, r=lqd
Add Marijn Schouten to .mailmap

Should fix https://github.com/rust-lang/thanks/issues/85
2025-10-23 21:32:14 +00:00
Augie Fackler
e3e342a90b rustc_codegen_llvm: adapt for LLVM 22 change to pass masked intrinsic alignment as an attribute
This was a bit more invasive than I had kind of hoped. An alternate
approach would be to add an extra call_intrinsic_with_attrs() that would
have the new-in-this-change signature for call_intrinsic, but this felt
about equivalent and made it a little easier to audit the relevant
callsites of call_intrinsic().
2025-10-23 17:23:01 -04:00
Guillaume Gomez
90c047b3d9 Replace the FxHashMap with an FxIndexMap 2025-10-23 21:45:37 +02:00
Josh Stone
c01682ebf6 Revert "feat: implement hash_map! macro"
This reverts commit 066023e47c.
2025-10-23 12:37:53 -07:00