306456 Commits

Author SHA1 Message Date
Matthias Krüger
a028b7a9e3
Rollup merge of #135771 - GuillaumeGomez:jump-to-def-perf, r=fmease
[rustdoc] Add support for associated items in "jump to def" feature

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

r? ``@fmease``
2025-09-25 18:15:06 +02:00
Matthias Krüger
a39d5134cd
Rollup merge of #116882 - fmease:rustdoc-generalized-priv-repr-heuristic, r=rustdoc
rustdoc: hide `#[repr]` if it isn't part of the public ABI

> [!IMPORTANT]
> Temporarily stacked on top of PR https://github.com/rust-lang/rust/pull/146527; only the last commit is relevant!

Follow-up to rust-lang/rust#115439.
Unblocks rust-lang/rust#116743, CC ``@dtolnay.``

Fixes rust-lang/rust#66401.
Fixes rust-lang/rust#128364.
Fixes rust-lang/rust#137440.

Only display the representation `#[repr(REPR)]` (where `REPR` is not `Rust` or `transparent`) of a given type if none of its variants (incl. the synthetic variants of structs) are `#[doc(hidden)]` and all of its fields are public and not `#[doc(hidden)]` since it's likely not meant to be considered part of the public ABI otherwise.

`--document-{private,hidden}-items` works as expected in this context, too.

Moreover, we now also factor in the presence of `#[doc(hidden)]` when checking whether to show `repr(transparent)` or not.
2025-09-25 18:15:06 +02:00
bors
7cfd7d328b Auto merge of #147003 - matthiaskrgr:rollup-b5z9uiz, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#146556 (Fix duration_since panic on unix when std is built with integer overflow checks)
 - rust-lang/rust#146679 (Clarify Display for error should not include source)
 - rust-lang/rust#146753 (Improve the pretty print of UnstableFeature clause)
 - rust-lang/rust#146894 (Improve derive suggestion of const param)
 - rust-lang/rust#146950 (core: simplify `CStr::default()`)
 - rust-lang/rust#146958 (Fix infinite recursion in Path::eq with String)
 - rust-lang/rust#146971 (fix ICE in writeback due to bound regions)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-25 10:30:50 +00:00
León Orell Valerian Liehr
85c193a4ed
rustdoc: hide #[repr(...)] if it isn't part of the public ABI 2025-09-25 11:49:27 +02:00
León Orell Valerian Liehr
d7d7725b8c
rustdoc: Fully escape link section and export name
Escape "special characters" (e.g., double quotes `"` and line breaks `\n`).
Escape HTML.

Lastly, add regression tests and clean up existing tests.
2025-09-25 11:30:58 +02:00
León Orell Valerian Liehr
88e797784e
rustdoc: Slightly clean up attr rendering 2025-09-25 10:16:52 +02:00
bors
bbcbc7818b Auto merge of #146981 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

17 commits in 966f94733bbc94ca51ff9f1e4c49ad250ebbdc50..f2932725b045d361ff5f18ba02b1409dd1f44e71
2025-09-16 17:24:45 +0000 to 2025-09-24 11:31:26 +0000
- fix: use `host-tuple` for host target subsitution (rust-lang/cargo#16003)
- test(build-std): move away from panic_immediate_abort  (rust-lang/cargo#16006)
- fix: Sparse URLs in `TomlLockfileSourceId` (rust-lang/cargo#15990)
- refactor(gctx): extract toml dotted keys validation (rust-lang/cargo#15998)
- feat: Add lint for global use of `hint-mostly-unused` (rust-lang/cargo#15995)
- Make GlobalContext Sync (rust-lang/cargo#15967)
- chore(deps): update cargo-semver-checks to v0.44.0 (rust-lang/cargo#15993)
- fix(frontatter): Only allow horizontal whitespace after fences (rust-lang/cargo#15975)
- docs: Add Lockfile schemas docs (rust-lang/cargo#15989)
- Add parallel frontend to the build performance guide (rust-lang/cargo#15970)
- chore(deps): update msrv (3 versions) to v1.88 (rust-lang/cargo#15988)
- chore(deps): update msrv (1 version) to v1.90 (rust-lang/cargo#15984)
- feat(cargo-util-schemas): Move lockfile schemas (rust-lang/cargo#15980)
- Clarify multiple version requirement behavior (rust-lang/cargo#15979)
- Adds ghostty as supported terminal for term integration (OSC 9;4) (rust-lang/cargo#15977)
- docs(team): Fixed broken office hours link (rust-lang/cargo#15976)
- docs: Clarify git sources vs git registries in source replacement documentation (rust-lang/cargo#15974)

r? ghost
2025-09-25 07:25:03 +00:00
Matthias Krüger
57ee169ff2
Rollup merge of #146971 - lcnr:fix-writeback, r=BoxyUwU
fix ICE in writeback due to bound regions

fixes rust-lang/rust#117808

r? `@BoxyUwU`
2025-09-24 23:33:29 +02:00
Matthias Krüger
d10d6bfb02
Rollup merge of #146958 - el-ev:fix_path_string_eq_recurse, r=joboet
Fix infinite recursion in Path::eq with String

- Closes [after beta backport] rust-lang/rust#146940
2025-09-24 23:33:28 +02:00
Matthias Krüger
6618ac7bb1
Rollup merge of #146950 - joboet:cstr_default, r=tgross35
core: simplify `CStr::default()`

Just use a `CStr`-literal...
2025-09-24 23:33:27 +02:00
Matthias Krüger
6351a63486
Rollup merge of #146894 - tiif:suggest_feature_attr, r=BoxyUwU
Improve derive suggestion of const param

Make the suggestion not to remove the adt and use the name of the adt variant in the diagnostic.

r? `@BoxyUwU`
2025-09-24 23:33:27 +02:00
Matthias Krüger
7a4ac48345
Rollup merge of #146753 - tiif:unsatisfiable-unstable-feature, r=BoxyUwU
Improve the pretty print of UnstableFeature clause

As per https://github.com/rust-lang/rust/pull/145095#discussion_r2349439492, we could make the diagnostic for unsatisfiable ``UnstableFeature`` clause better.

r? `@BoxyUwU`
2025-09-24 23:33:26 +02:00
Matthias Krüger
0ab93860ed
Rollup merge of #146679 - stepancheg:error-display-source, r=dtolnay
Clarify Display for error should not include source

Fixes rust-lang/rust#145561.

r? `@Noratrieb`
2025-09-24 23:33:25 +02:00
Matthias Krüger
8073b6f169
Rollup merge of #146556 - stepancheg:repro-146228, r=tgross35
Fix duration_since panic on unix when std is built with integer overflow checks

Add a test for regression rust-lang/rust#146228, and turns out this test fails detects error when std is compiled with integer overflow checks.

Original regression was reverted in rust-lang/rust#146473.

First attempt to fix was in rust-lang/rust#146247; test and some code is copied from there, thanks `@eval-exec`

r? `@RalfJung`
2025-09-24 23:33:25 +02:00
Stepan Koltsov
92859e98ee Repro duration_since regression from issue 146228 2025-09-24 21:07:26 +01:00
Stepan Koltsov
a9554b4d5f Clarify Display for error should not include source 2025-09-24 20:02:35 +01:00
bors
caccb4d036 Auto merge of #146999 - matthiaskrgr:rollup-0gbkm82, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#146711 (fix 2 borrowck issues)
 - rust-lang/rust#146857 (revert change removing `has_infer` check. Commit conservatively patch…)
 - rust-lang/rust#146897 (fix ICE in rustdoc::invalid_html_tags)
 - rust-lang/rust#146915 (Make missed precondition-free float intrinsics safe)
 - rust-lang/rust#146932 (Switch next-solver related rustc dependencies of r-a to crates.io ones)
 - rust-lang/rust#146959 (temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions)
 - rust-lang/rust#146964 (library: std: sys: pal: uefi: Add some comments)
 - rust-lang/rust#146969 (const-eval: better wording for errors involving maybe-null pointers)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-24 18:35:58 +00:00
Matthias Krüger
ec378dc773
Rollup merge of #146969 - RalfJung:maybe-null-errors, r=oli-obk
const-eval: better wording for errors involving maybe-null pointers

Fixes https://github.com/rust-lang/rust/issues/146748
r? ``@oli-obk``
2025-09-24 20:34:31 +02:00
Matthias Krüger
24e19c9088
Rollup merge of #146964 - Ayush1325:close-protocol, r=joboet
library: std: sys: pal: uefi: Add some comments

I seemed to have forgotten that since I am using GET_PROTOCOL attribute for the std usecases, I did not need to close the protocols explicitly. So adding these comments as a note to future self not to waste time on the same thing again.
2025-09-24 20:34:31 +02:00
Matthias Krüger
af224996c6
Rollup merge of #146959 - tshepang:patch-2, r=nnethercote
temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions

Also
- add Reference id
- fix typo
2025-09-24 20:34:29 +02:00
Matthias Krüger
4300cd64df
Rollup merge of #146932 - ShoyuVanilla:ra-in-tree-hack, r=lcnr
Switch next-solver related rustc dependencies of r-a to crates.io ones

r? ``@ghost``

cc ``@lnicola`` ``@lcnr``
2025-09-24 20:34:25 +02:00
Matthias Krüger
2320fc3a38
Rollup merge of #146915 - clarfonthey:safe-intrinsics-2, r=RalfJung
Make missed precondition-free float intrinsics safe

So, in my defence, these were both separated out from the other intrinsics in the file *and* had a different safety comment in the stable versions, so, I didn't notice them before. But, in my offence, the entire reason I did the previous PR was because I was using them for SIMD intrinsic fallbacks, and `fabs` is needed for those too, so, I don't really have an excuse.

Extra follow-up to rust-lang/rust#146683.

r? ```@RalfJung``` who reviewed the previous one

These don't appear to be used anywhere outside of the standard locations, at least.
2025-09-24 20:34:22 +02:00
Matthias Krüger
4e225ee72d
Rollup merge of #146897 - lolbinarycat:rustdoc-invalid_html_tags-ice-146890, r=GuillaumeGomez
fix ICE in rustdoc::invalid_html_tags

fixes https://github.com/rust-lang/rust/issues/146890

r? ```@GuillaumeGomez```
2025-09-24 20:34:21 +02:00
Matthias Krüger
79bb3c4879
Rollup merge of #146857 - tnuha:revert_self_has_no_region_infer, r=lcnr
revert change removing `has_infer` check. Commit conservatively patch…

…es for now, but more development proceeding.

Hotfix for rust-lang/rust#146852.
2025-09-24 20:34:20 +02:00
Matthias Krüger
3150538911
Rollup merge of #146711 - lcnr:fix-placeholder-ice, r=lqd
fix 2 borrowck issues

fixes https://github.com/rust-lang/rust/issues/146467 cc ``@amandasystems``

our understanding here is as follows: region constraints from computing implied bounds gets `ConstraintCategory::Internal`. If there's a higher-ranked subtyping errors while computing implied bounds we then ended up with only `ConstraintCategory::Internal` and `ConstraintCategory::OutlivesUnnameablePlaceholder(_)` constraints.

The path was something like
- `'placeholderU2: 'placeholderU1` (`Internal`)
- `'placeholderU1: 'static` (`OutlivesUnnameablePlaceholder('placeholderU2)`)

It's generally somewhat subtle here as ideally relating placeholders doesn't introduce `'static` constraints. Relating the placeholders themselves will always error regardless, cc https://github.com/rust-lang/rust/pull/142623.

---

separately fixes https://github.com/rust-lang/rust/pull/145925#issuecomment-3303733357 by updating the location for deferred closure requirements inside of promoteds. I am not updating their category as doing so is 1) effort and 2) imo actually undesirable 🤔 see the comments in `TypeChecker::check_promoted` cc ``@lqd``

r? lqd
2025-09-24 20:34:19 +02:00
tiif
4e62715541 Improve the pretty print of UnstableFeature clause 2025-09-24 15:22:10 +00:00
Weihang Lo
6dafcaf6c8
Update cargo submodule 2025-09-24 09:33:43 -04:00
Iris Shi
5a4e536036
Fix infinite recursion in Path::eq with String 2025-09-24 21:30:41 +08:00
tiif
30289353e8 Improve derive suggestion of const param
Make the suggestion not to remove the adt and use the name of the adt
variant
2025-09-24 13:29:23 +00:00
bors
15283f6fe9 Auto merge of #146338 - CrooseGit:dev/reucru01/AArch64-enable-GCS, r=Urgau,davidtwco
Extends AArch64 branch protection support to include GCS

Extends existing support for AArch64 branch protection to include support for [Guarded Control Stacks](https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022#guarded-control-stack-gcs:~:text=Extraction%20or%20tracking.-,Guarded%20Control%20Stack%20(GCS),-With%20the%202022).
2025-09-24 13:04:19 +00:00
Shoyu Vanilla
0e7cc32633 Switch next-solver related rustc dependencies of r-a to crates.io ones 2025-09-24 21:28:50 +09:00
joboet
a875f7779e
alloc: simplify Default for Box<CStr> and Rc<CStr> 2025-09-24 14:13:34 +02:00
Ralf Jung
8328c3dada const validation: better error for maybe-null references 2025-09-24 13:35:29 +02:00
Ralf Jung
0a41add629 const-eval: improve and actually test the errors when pointers might be outside the range of a scalar 2025-09-24 13:34:33 +02:00
lcnr
2886ca496a imrpove type_op failure ICE 2025-09-24 13:08:25 +02:00
lcnr
32d24f9efa allow bound regions in writeback 2025-09-24 13:08:25 +02:00
lcnr
3378997867
fix wording
Co-authored-by: Rémy Rakic <remy.rakic+github@gmail.com>
2025-09-24 12:50:50 +02:00
bors
e9385f9eea Auto merge of #146946 - matthiaskrgr:rollup-fsmrqez, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - rust-lang/rust#146818 (constify {float}::total_cmp())
 - rust-lang/rust#146896 (rustc-dev-guide subtree update)
 - rust-lang/rust#146898 (Update books)
 - rust-lang/rust#146899 (Fix a crash/mislex when more than one frontmatter closing possibility is considered)
 - rust-lang/rust#146904 (rust-lang/rust#140368 Mutex/RwLock/ReentrantLock::data_ptr to be const fn)
 - rust-lang/rust#146907 (add regression test for issue 146537)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-09-24 09:55:21 +00:00
Ayush Singh
03fd823dbf
library: std: sys: pal: uefi: Add some comments
I seemed to have forgotten that since I am using GET_PROTOCOL attribute
for the std usecases, I did not need to close the protocols explicitly.
So adding these comments as a note to future self not to waste time on
the same thing again.

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-09-24 13:26:03 +05:30
Tshepang Mbambo
c9dc0e307a
temporary-lifetime-extension-tuple-ctor.rs: make usable on all editions
Also
- add Reference id
- fix typo
2025-09-24 07:01:24 +02:00
bors
3e887f5faa Auto merge of #146953 - dianqk:update-llvm, r=cuviper
Update LLVM to 21.1.2

Fixes rust-lang/rust#146065.
2025-09-24 04:25:26 +00:00
dianqk
95ddfa102a
Update LLVM to 21.1.2 2025-09-24 07:34:22 +08:00
joboet
aa537824c4
core: simplify CStr::default()
Just use a `CStr`-literal...
2025-09-24 00:50:36 +02:00
ltdk
e8a8e061bf Make missed precondition-free float intrinsics safe 2025-09-23 18:15:11 -04:00
Matthias Krüger
6617536d14
Rollup merge of #146907 - cyrgani:146537-test, r=nnethercote
add regression test for issue 146537

Adds a test based on the reduction in https://github.com/rust-lang/rust/issues/146537#issuecomment-3289438439.
This was already fixed in rust-lang/rust#142882 before the issue was even reported, but no test for it was added yet.
2025-09-23 23:40:30 +02:00
Matthias Krüger
bba509eb7e
Rollup merge of #146904 - peter-lyons-kehl:140368_data_ptr_const_fn, r=Amanieu
#140368 Mutex/RwLock/ReentrantLock::data_ptr to be const fn
2025-09-23 23:40:29 +02:00
Matthias Krüger
f984966325
Rollup merge of #146899 - Teapot4195:issue-146847-fix, r=nnethercote
Fix a crash/mislex when more than one frontmatter closing possibility is considered

When the less fortunate recovery path for frontmatters are taken, if the lexer considers more than one possible frontmatter closing possibility, the current index is entirely mis-tracked and can result in bump_bytes landing in the middle of a multichar unicode character.

This fixes it by tracking the actual base index and updating it as it considers additional closing possibilities.

fixes rust-lang/rust#146847
2025-09-23 23:40:29 +02:00
Matthias Krüger
7d0c283bbf
Rollup merge of #146898 - rustbot:docs-update, r=ehuss
Update books

## rust-lang/book

1 commits in 3e9dc46aa563ca0c53ec826c41b05f10c5915925..33f1af40cc44dde7e3e892f7a508e6f427d2cbc6
2025-09-15 16:10:14 UTC to 2025-09-15 16:10:14 UTC

- Release trpl 0.3 (rust-lang/book#4505)

## rust-lang/reference

9 commits in b3ce60628c6f55ab8ff3dba9f3d20203df1c0dee..cc7247d8dfaef4c39000bb12c55c32ba5b5ba976
2025-09-20 10:26:26 UTC to 2025-09-08 18:07:29 UTC

- Document temporary scoping for destructuring assignments (rust-lang/reference#1992)
- Specify lifetime extension of `pin!` and `format_args!` arguments (rust-lang/reference#1980)
- update for more ABIs supporting c-variadics (rust-lang/reference#1936)
- Fix incorrect span tag (rust-lang/reference#1995)
- Remove strike attribute (rust-lang/reference#1997)
- Specify the target limits for target-specific ABIs (rust-lang/reference#2000)
- Remove tuple index carve out (rust-lang/reference#1966)
- Enable folding of chapter listing in navigation sidebar (rust-lang/reference#1988)
- Add support to grammar for single line comments (rust-lang/reference#1993)

## rust-lang/rust-by-example

1 commits in dd26bc8e726dc2e73534c8972d4dccd1bed7495f..2c9b490d70e535cf166bf17feba59e594579843f
2025-09-18 22:28:52 UTC to 2025-09-18 22:28:52 UTC

- Update unit testing output for additional test (rust-lang/rust-by-example#1958)
2025-09-23 23:40:28 +02:00
Matthias Krüger
f89d26b695
Rollup merge of #146896 - tshepang:rdg-sync, r=tshepang
rustc-dev-guide subtree update

Subtree update of `rustc-dev-guide` to d76c84c23c.

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

r? `````@ghost`````
2025-09-23 23:40:27 +02:00
Matthias Krüger
c2e11d7e43
Rollup merge of #146818 - npmccallum:total_cmp, r=fee1-dead
constify {float}::total_cmp()
2025-09-23 23:40:27 +02:00