Commit graph

305463 commits

Author SHA1 Message Date
bors
ed61e7d7e2 Auto merge of #148593 - pietroalbini:ea-1.91.1, r=BoxyUwU
[stable] Prepare Rust 1.91.1

This PR prepares the artifacts for Rust 1.91.1, targeting next Monday with the following backports:

* https://github.com/rust-lang/rust/pull/148322
* https://github.com/rust-lang/rust/pull/148363

cc `@rust-lang/release`
2025-11-07 03:39:30 +00:00
Emily Albini
e42a4ca53b bump version number 2025-11-06 19:09:25 +01:00
Emily Albini
ae5f6ed3e4 update release notes 2025-11-06 19:09:14 +01:00
Alex Crichton
279ca7e533 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
2025-11-06 19:04:11 +01:00
Emily Albini
1a7eff4024 enable flock for illumos 2025-11-06 19:04:02 +01:00
bors
f8297e351a Auto merge of #148216 - cuviper:stable-next, r=BoxyUwU,jackh726
[stable] Further revert `Deref for Cow` to its 1.90.0 state

It's not clear whether it breaks anything to *not* have this bound,
but the conservative choice is to match the state as of 1.90.0.

See also:
https://github.com/rust-lang/rust/issues/147964#issuecomment-3446420995
https://rust-lang.zulipchat.com/#narrow/channel/144729-t-types/topic/Can.20this.20change.20break.20code.20in.201.2E91.3F/with/547528362
2025-10-28 16:34:16 +00:00
Josh Stone
faf3e0b589 Further revert Deref for Cow to its 1.90.0 state
ref: https://github.com/rust-lang/rust/issues/147964#issuecomment-3446420995
2025-10-28 08:41:14 -07:00
bors
40c4f6dfcd Auto merge of #148179 - cuviper:stable-next, r=cuviper
[stable] Prepare Rust 1.91.0 release

- [beta-1.91] Add more context to the temporary lifetime extension FCW rust-lang/rust#148174
- rustdoc-search: JavaScript optimization based on Firefox Profiler output rust-lang/rust#146484
- rustdoc-search: use the same ID for entry and path to same item rust-lang/rust#147045
- rustdoc-search: stringdex update with more packing rust-lang/rust#147002
- rustdoc-search: stringdex 0.0.2 rust-lang/rust#147660
- [beta] Clippy beta backport rust-lang/rust#148029
- 1.91.0 release notes rust-lang/rust#148013

r? cuviper
2025-10-27 20:35:19 +00:00
Josh Stone
be999adba7 1.91.0 stable release 2025-10-27 10:58:10 -07:00
Timo
e4f50310ce fix(len_zero): don't eagerly call GenericArgs::type_at (#15660)
Fixes https://github.com/rust-lang/rust-clippy/issues/15657

changelog: [`len_zero`]: fix ICE when `fn len` has a return type without
generic type params
2025-10-27 10:58:10 -07:00
Michael Howell
7ce30224e3 rustdoc-search: stringdex 0.0.2
Two index format tweaks that reduce the size of the standard
library, compiler, and wordnet dictionary when I test it.

(cherry picked from commit fdeb3633d9)
2025-10-27 09:36:11 -07:00
Michael Howell
716b84ed5b rustdoc-search: stringdex update with more packing
Before:

    18M  build/x86_64-unknown-linux-gnu/doc/search.index/
    57M  build/x86_64-unknown-linux-gnu/compiler-doc/search.index/

After:

    16M  build/x86_64-unknown-linux-gnu/doc/search.index/
    49M  build/x86_64-unknown-linux-gnu/compiler-doc/search.index/

(cherry picked from commit 5bec161ce1)
2025-10-27 09:36:11 -07:00
Michael Howell
b0dd64fec6 rustdoc-search: add descriptive comment to space-saving hack
(cherry picked from commit 9dce3e8556)
2025-10-27 09:36:11 -07:00
Michael Howell
812776042b rustdoc-search: use the same ID for entry and path to same item
This decreases the size of the compiler-doc from 57MiB to 56MiB.

(cherry picked from commit b9037f97e3)
2025-10-27 09:36:11 -07:00
Michael Howell
b77c3b193a rustdoc-search: delay loading type name IDs until type search
This avoids blocking on these lookups, so name-based searches
return results more quickly.

(cherry picked from commit 277e845162)
2025-10-27 09:36:11 -07:00
Michael Howell
063ccaad42 rustdoc-search: reduce async machinery in value lookups
This commit is a mirrored change from stringdex that
makes `at()` not always return a promise, which is fine because
we can still `await` it.

(cherry picked from commit 43d45ef2da)
2025-10-27 09:36:11 -07:00
Theemathas Chirananthavat
6ab240d329 [beta-1.91] Add more context to the temporary lifetime extension FCW
Mention in the FCW that the lifetime extension behavior was wrong since 1.88/1.89.
2025-10-27 21:49:39 +07:00
bors
f2f881bb99 Auto merge of #148075 - cuviper:beta-next, r=cuviper
[beta] backports

- Revert constification of `AsRef for Cow` due to inference failure rust-lang/rust#148011
- Revert constification of `Borrow` and `Deref for Cow` due to inference failure rust-lang/rust#148016
- Revert "fix: Filter suggestion parts that match existing code" rust-lang/rust#148043
- Revert "feat: implement `hash_map!` macro" rust-lang/rust#148049
- fix panic when rustc tries to reduce intermediate filenames len with utf8 rust-lang/rust#148018

r? cuviper
2025-10-25 11:05:15 +00:00
Pierre Tardy
1e668e089d 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.

(cherry picked from commit c6acffeb78)
2025-10-24 14:58:36 -07:00
Josh Stone
912aba6874 Revert "feat: implement hash_map! macro"
This reverts commit 066023e47c.

(cherry picked from commit c01682ebf6)
2025-10-24 10:13:04 -07:00
Josh Stone
4bc789b5b1 Add a regression test for rust-lang/rust#147971
(cherry picked from commit a81ed52f58)
2025-10-24 10:13:04 -07:00
Rémy Rakic
1dda76181e add crashes tests for overlapping spans
(cherry picked from commit dd83c57674)
2025-10-24 10:12:51 -07:00
Rémy Rakic
c956a76bd6 Revert "Auto merge of #146121 - Muscraft:filter-suggestion-parts, r=petrochenkov"
This reverts commit 99317ef14d, reversing
changes made to 9cd272dc85.

(cherry picked from commit a2b48332ba)
2025-10-24 10:12:51 -07:00
ltdk
21ffe30cd5 Add regression test for inference failures
(cherry picked from commit 4a4f3b0e8e)
2025-10-24 10:12:43 -07:00
ltdk
566809897f Revert inference failure from Deref/Borrow constification
(cherry picked from commit ebd5bea84f)
2025-10-24 10:12:43 -07:00
ltdk
b6d30faa79 Revert inference failure from AsRef constification
(cherry picked from commit cb7fb35ad1)
2025-10-24 10:12:37 -07:00
bors
1f25197887 Auto merge of #147791 - cuviper:beta-next, r=cuviper
[beta] backports

- Change int-to-ptr transmute lowering back to inttoptr rust-lang/rust#147541
- rewrite outlives placeholder constraints to outlives static when handling opaque types rust-lang/rust#147566
- GVN: Invalidate derefs at loop headers rust-lang/rust#147607

r? cuviper
2025-10-17 00:04:22 +00:00
dianqk
408e09e77c GVN: Invalidate derefs at loop headers
(cherry picked from commit 2048b9c027)
2025-10-16 14:17:45 -07:00
dianqk
5b36a0a7b2 Add miscompiled test cases
(cherry picked from commit 64c023bad8)
2025-10-16 14:16:46 -07:00
Boxy Uwu
00c06488ad in opaque type handling lift region vars to static if they outlive placeholders
(cherry picked from commit 30bedc74d4)
2025-10-16 14:16:24 -07:00
Ben Kimock
6b4f96d492 Change int-to-ptr transmute lowering back to inttoptr
(cherry picked from commit 029579d177)
2025-10-16 14:12:06 -07:00
bors
df8b2e497d Auto merge of #147056 - dianne:fcw-super-let-init-borrow-shortening, r=jackh726
[beta-1.91] Warn on future errors from temporary lifetimes shortening in Rust 1.92

Pursuant to [discussion on Zulip](https://rust-lang.zulipchat.com/#narrow/channel/474880-t-compiler.2Fbackports/topic/.23145838.3A.20beta-nominated/near/540530631), this implements a future-compatibility warning lint `macro_extended_temporary_scopes` for errors in Rust 1.92 caused by rust-lang/rust#145838:

```
warning: temporary lifetime shortening in Rust 1.92
  --> $DIR/macro-extended-temporary-scopes.rs:54:14
   |
LL |             &struct_temp().field
   |              ^^^^^^^^^^^^^ this expression creates a temporary value...
...
LL |         } else {
   |         - ...which will be dropped at the end of this block in Rust 1.92
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see <https://doc.rust-lang.org/rustc/lints/listing/warn-by-default.html#macro-extended-temporary-scopes>
   = note: consider using a `let` binding to create a longer lived value
```

Implementation-wise, this reuses the existing temporary scoping FCW machinery introduced for the `tail_expr_drop_order` edition lint: this adds `BackwardIncompatibleDropHint` statements to the MIR at the end of the shortened scopes for affected temporaries; these are then checked in borrowck to warn if the temporary is used after the future drop hint. There are trade-offs here: on one hand, I believe this gives some assurance over ad-hoc pattern-recognition that there are no false positives[^1]. On the other hand, this fails to lint on future dangling raw pointers and it complicates the potential addition of explanatory diagnostics or suggestions[^2]. I'm hopeful that the limitation around dangling pointers won't be relevant in real code, though; the only real instance we've seen of breakage so far is future errors in formatting macro invocations, which this should be able to catch.

Release logistics notes:
- This PR targets the beta branch directly, since the breakage it's a FCW for is landing in the next Rust version.
- rust-lang/rust#146098 undoes the breakage this is a FCW for. If that behavior is merged and stabilizes in Rust 1.92, this PR should be reverted (or shouldn't be merged) in order to avoid spurious warnings.

cc `@traviscross`

`@rustbot` label +T-lang

[^1]: In particular, more syntactic approaches are complicated by having to avoid warning on promoted constants; they'd either be full of holes, they'd need a lot of extra logic, or they'd need to hack more MIR-to-HIR mapping into `PromoteTemps`.
[^2]: It's definitely possible to add more context and a suggestion, but the ways I've thought of to do so are either too hacky or too complex to feel appropriate for a last-minute direct-to-beta lint.
2025-10-15 01:35:47 +00:00
dianne
164620feda warn on shortening super let binding lifetimes 2025-10-13 22:45:25 -07:00
dianne
9f7ad5ee77 add a test for shortening super let binding lifetimes 2025-10-13 22:45:09 -07:00
dianne
6c2246d9b3 warn on future errors from temporary lifetimes shortening in Rust 1.92 2025-10-13 22:45:09 -07:00
bors
d69b1bb497 Auto merge of #147569 - weihanglo:update-beta-cargo, r=weihanglo
[beta-1.91] Update cargo submodule

2 commits in 785a383cf715417fcd68c4a98a4523c2d082bb0f..ea2d97820c16195b0ca3fadb4319fe512c199a43
2025-10-04 19:17:20 -0500 to 2025-10-10 15:19:24 -0400
- [beta-1.91] fix: use `host-tuple` for host target subsitution (rust-lang/cargo#16032)
- [beta-1.91] fix(timings): compute codegen start time to draw dep lines (rust-lang/cargo#16057)

r? ghost
2025-10-14 01:08:28 +00:00
bors
cbf84ed0ca Auto merge of #147571 - cuviper:beta-next, r=cuviper
[beta] backports

- Don't normalize higher-ranked assumptions if they're not used rust-lang/rust#147299
- Fix target list of `link_section` rust-lang/rust#147418
- bootstrap: add `Builder::rustc_cmd` that includes the lib path rust-lang/rust#147419
- Update LLVM to 21.1.2 rust-lang/rust#146953
- Remove the temporary directory when a check ends -- part of rust-lang/rust#147518

r? cuviper
2025-10-11 22:45:30 +00:00
dianqk
5bef4363ab Remove the temporary directory when a check ends
(cherry picked from commit a3482d97c6)
2025-10-11 09:41:17 -07:00
dianqk
3f2437c4a4 Update LLVM to 21.1.2
(cherry picked from commit 95ddfa102a)
2025-10-10 13:40:18 -07:00
Weihang Lo
73481bf395
[beta-1.91] Update cargo submodule 2025-10-10 15:51:34 -04:00
Josh Stone
3222bef156 bootstrap: add Builder::rustc_cmd that includes the lib path
When building with `rust.rpath = false`, every `rustc` invocation needs
to include the library path as well. I particularly ran into this in
`generate_target_spec_json_schema` when testing 1.91-beta in Fedora,
where we do disable rpath for our system builds. The new helper function
will hopefully encourage the right thing going forward.

(cherry picked from commit 03cdcb5cd5)
2025-10-10 09:56:39 -07:00
Jonathan Brouwer
555abc18d7 Add regression test for link_section targets
(cherry picked from commit 1589c6c12d)
2025-10-10 09:30:05 -07:00
Jonathan Brouwer
15843ffde1 Fix target list of link_section
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
(cherry picked from commit 4787834eda)
2025-10-10 09:23:48 -07:00
Michael Goulet
91163a9e1e Don't normalize higher-ranked assumptions if they're not used
(cherry picked from commit e3f104608c)
2025-10-10 09:20:53 -07:00
bors
21cd82aa63 Auto merge of #147284 - cuviper:beta-next, r=cuviper
[beta] backports

- remove incorrect fast path rust-lang/rust#146919
- Fix infinite recursion in Path::eq with String rust-lang/rust#146958
- Make #[link="dl"] an FCW rather than an error rust-lang/rust#147262

r? cuviper
2025-10-08 03:09:11 +00:00
Jonathan Brouwer
0d2b92cd1e Make #[link="dl"] a warning rather than an error
(cherry picked from commit 1c85a1dc2e)
2025-10-07 15:41:15 -07:00
Jonathan Brouwer
d4278373a9 Add failing regression test for #[link="dl"]
(cherry picked from commit 5c95f8bea6)
2025-10-07 15:41:15 -07:00
Josh Stone
61380c48dd Update cargo submodule from branch rust-1.91.0 2025-10-07 15:41:15 -07:00
Iris Shi
6271db5ab5 Fix infinite recursion in Path::eq with String
(cherry picked from commit 5a4e536036)
2025-10-07 15:41:15 -07:00
lcnr
34182f6e7d add test
(cherry picked from commit 7a0adc0878)
2025-10-02 16:20:09 -07:00