Weihang Lo
96d760c748
Update cargo submodule
2025-11-18 19:35:43 -05:00
bors
3d461af2a2
Auto merge of #149059 - GuillaumeGomez:rollup-s6m2mmy, r=GuillaumeGomez
...
Rollup of 4 pull requests
Successful merges:
- rust-lang/rust#148970 (std: sys: fs: uefi: Implement stat)
- rust-lang/rust#149020 (flush_delayed: add note about stashed diagnostics)
- rust-lang/rust#149026 (Add test for href of reexported enum variant)
- rust-lang/rust#149049 (compiletest: Use JSON "binary-format" to decide `//@ only-elf` and `//@ ignore-elf`)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-18 14:07:46 +00:00
Guillaume Gomez
6120f0d54b
Rollup merge of #149049 - Zalathar:only-elf, r=clubby789
...
compiletest: Use JSON "binary-format" to decide `//@ only-elf` and `//@ ignore-elf`
Some tests only apply to ELF targets, or want to enable different test revisions for ELF and non-ELF targets. So compiletest supports the `//@ only-elf` and `//@ ignore-elf` directives to make that possible.
Historically, deciding whether the current target is an ELF target relied on a handful of ad-hoc string comparisons against the target tuple.
However, nowadays compiletest has access to the output of `--print=all-target-specs-json`, and that JSON output specifies the binary format of each target, making it much easier to determine whether a target is ELF or not.
2025-11-18 14:14:40 +01:00
Guillaume Gomez
1fd16b19fc
Rollup merge of #149026 - GuillaumeGomez:test-for-reexported-variant, r=lolbinarycat
...
Add test for href of reexported enum variant
Working on https://github.com/rust-lang/rust/issues/148648 and realized that we actually didn't test for enum variants reexports, so here we are.
I also think I'll do rust-lang/rust#148648 at the same time as https://github.com/rust-lang/rust/issues/148547 .
r? `@lolbinarycat`
2025-11-18 14:14:39 +01:00
Guillaume Gomez
abf6d307ae
Rollup merge of #149020 - RalfJung:flush_delayed, r=nnethercote
...
flush_delayed: add note about stashed diagnostics
r? `@nnethercote`
Is `emit_stashed_diagnostics` the right advice to give? The other option seems to be to call `finish_diagnostics`. That's what I ended up doing (for now) in https://github.com/rust-lang/miri/pull/4702 because it best matches what happens during normal compilation.
2025-11-18 14:14:39 +01:00
Guillaume Gomez
ff262bcb29
Rollup merge of #148970 - Ayush1325:uefi-fs-stat, r=joboet
...
std: sys: fs: uefi: Implement stat
- Implement std::fs::metadata function.
- Tested on qemu ovmf
2025-11-18 14:14:38 +01:00
Guillaume Gomez
8642d82ff5
Add test for href of reexported enum variant
2025-11-18 12:23:32 +01:00
Guillaume Gomez
2a1bd47a4a
Move tests/rustdoc/import_trait_associated_functions.rs into the reexport folder
2025-11-18 12:23:32 +01:00
bors
f9e7961506
Auto merge of #148151 - cjgillot:no-offset-of, r=scottmcm
...
Replace OffsetOf by an actual sum of calls to intrinsic.
This PR changes the way we compute the value of the `offset_of!` macro in MIR. The current implementation uses a dedicated MIR rvalue.
This PR proposes to replace it by an inline constant which sums calls to a new intrinsic `offset_of(variant index, field index)`. The desugaring is done at THIR building time, easier that doing it on MIR.
The new intrinsic is only meant to be used by const-eval. LLVM codegen will refuse to generate code for it.
We replace:
```rust
a = offset_of!(T, Variant1.Field1.Variant2.Field2);
```
By:
```rust
a = const {constant#n};
{constant#n}: usize = {
_1 = offset_of::<T>(index of Variant1, index of Field1);
_2 = offset_of::<U>(index of Variant2, index of Field2); // Where T::Variant1::Field1 has type U
_0 = _1 + _2
}
```
The second commit modifies intrinsic const checking to take `allow_internal_unstable` into account. The new intrinsic should only be called from stable `offset_of!` macro. The intrinsic itself is unstable, const-unstable, but `rustc_intrinsic_const_stable_indirect`.
Fixes rust-lang/rust#123959
Fixes rust-lang/rust#125680
Fixes rust-lang/rust#129425
Fixes rust-lang/rust#136175
r? `@ghost`
2025-11-18 10:55:59 +00:00
Ayush Singh
6106760f31
std: sys: fs: uefi: Implement stat
...
- Implement std::fs::metadata function.
- Tested on qemu ovmf
Signed-off-by: Ayush Singh <ayush@beagleboard.org >
2025-11-18 15:11:08 +05:30
bors
c1995621a4
Auto merge of #148803 - jsgf:rust-annotate-default, r=Kobzol
...
Build with -Zannotate-moves by default (non-stage-0 only)
Build rustc and tools with -Zannotate-moves by default, both to exercise the feature and because could be useful for doing performance measurement on rustc and its tools. This has no effect on generated code, it just adds extra debug info in
the form of some new inlined functions.
This also adds bootstrap.toml config options
```
# rust.annotate-moves = true
# rust.annotate-moves-size-limit = 65
```
to allow this to be controlled locally.
This is only added for stage 1 and later. Stage 0 (the bootstrap compiler) doesn't yet support -Zannotate-moves.
2025-11-18 07:42:43 +00:00
bors
217cb73577
Auto merge of #149040 - RustyYato:patch-2, r=Kivooeo
...
Update RustyYato's email
I no longer use the old email address
2025-11-18 04:30:45 +00:00
Zalathar
7560717231
Use JSON "binary-format" to decide //@ only-elf and //@ ignore-elf
2025-11-18 14:08:51 +11:00
Zalathar
d835b7c009
Add some tests for //@ ignore-elf and //@ only-elf
2025-11-18 13:35:19 +11:00
Camille Gillot
e7991602ed
Add THIR building test.
2025-11-18 00:32:51 +00:00
Camille Gillot
aeb9332b28
Complete doc.
2025-11-18 00:10:04 +00:00
Camille Gillot
63a7712552
Simplify implementation.
2025-11-18 00:10:03 +00:00
Camille Gillot
12e91cf814
Honor allow_internal_unstable for const intrinsics.
2025-11-18 00:10:03 +00:00
Camille Gillot
72444372ae
Replace OffsetOf by an actual sum.
2025-11-18 00:10:03 +00:00
bors
fb505a7985
Auto merge of #149039 - matthiaskrgr:rollup-9vt1ady, r=matthiaskrgr
...
Rollup of 4 pull requests
Successful merges:
- rust-lang/rust#147077 (std: move `kernel_copy` to `sys`)
- rust-lang/rust#149030 (doc: fix `strict_provenance_lints` tracking issue link)
- rust-lang/rust#149031 (Update books)
- rust-lang/rust#149034 (update my email in mailmap)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-17 21:38:07 +00:00
RustyYato
261c37b788
Update RustyYato's email
...
I no longer use the old email address
2025-11-17 15:04:57 -06:00
Matthias Krüger
d810867750
Rollup merge of #149034 - mati865:mailmap, r=clubby789
...
update my email in mailmap
2025-11-17 21:48:00 +01:00
Matthias Krüger
f51efa1de9
Rollup merge of #149031 - rustbot:docs-update, r=ehuss
...
Update books
## rust-lang/book
61 commits in f660f341887c8bbcd6c24fbfdf5d2a262f523965..f78ab89d7545ac17780e6a367055cc089f4cd2ec
2025-11-10 03:30:48 UTC to 2025-01-22 16:19:58 UTC
- Merge 3rd ed to main (rust-lang/book#4567 )
- Fix typo in section 17.2 (rust-lang/book#4456 )
- Chapter 19 from tech review (rust-lang/book#4446 )
- Chapter 18 from tech review (rust-lang/book#4445 )
- Chapter 16 from tech review (rust-lang/book#4438 )
- WIP ch 17 edits after tech review (rust-lang/book#4319 )
- Chapter 15 from tech review (rust-lang/book#4433 )
- Chapter 14 from tech review (rust-lang/book#4423 )
- Chapter 13 from tech review (rust-lang/book#4421 )
- Chapter 12 from tech review (rust-lang/book#4410 )
- Chapter 11 from tech review (rust-lang/book#4391 )
- Chapter 10 from tech review (rust-lang/book#4379 )
- Chapter 9 from tech review (rust-lang/book#4377 )
- Chapter 8 from tech review (rust-lang/book#4378 )
- Chapter 7 from tech review (rust-lang/book#4374 )
- Chapter 6 from tech review (rust-lang/book#4370 )
- Chapter 5 from tech review (rust-lang/book#4359 )
- Chapter 4 from tech review (rust-lang/book#4358 )
- Chapter 3 from tech review (rust-lang/book#4353 )
- Ch01+ch02 after tech review (rust-lang/book#4329 )
- Ch. 21: call out Chrome multiple-connections issue (rust-lang/book#4297 )
- Ch. 16: refactor 16-6 to using listing component (rust-lang/book#4295 )
- Ch. 01: Show how to work offline (rust-lang/book#4294 )
- Ch. 07: Clarify sentences about `pub use` (rust-lang/book#4293 )
- Ch. 02: Consistent ordering of `use` statements (rust-lang/book#4292 )
- Anchors on listings (rust-lang/book#4271 )
- Ch. 17: another tweak to how we phrase things about sections (rust-lang/book#4288 )
- Ch. 20: correct listing number (rust-lang/book#4287 )
- Ch. 10.3: clarify language detail (rust-lang/book#4284 )
- Ch. 17: minor typos and link reference (rust-lang/book#4286 )
- Ch. 9: correctly demonstrate privacy with module (rust-lang/book#4282 )
- Ch. 18: correct discussion of delegation in `Post` methods (rust-lang/book#4281 )
- Ch. 20: tell folks to see the Reference for more ABI info (rust-lang/book#4165 )
- Ch 10.1 minor clarifications (rust-lang/book#4256 )
- Clarified the misunderstanding b/w crates, module, items (rust-lang/book#4232 )
- Ferris: always show, even when it’s small (rust-lang/book#4280 )
- Ch. 17: mention `use std::pin::{Pin, pin};` on introduction (rust-lang/book#4279 )
- Persist printing error, NOT ErrorKind (rust-lang/book#4259 )
- Typo: "2" should be "2 seconds" (rust-lang/book#4263 )
- Ch. 17: fix tiny example consistency issue (rust-lang/book#4270 )
- Bump ring from 0.17.8 to 0.17.13 in /listings/ch17-async-await/listing-17-02 (rust-lang/book#4261 )
- Bump ring from 0.17.8 to 0.17.14 in /packages/trpl (rust-lang/book#4273 )
- 2024 Print Edition: updates to Word docs and more fixes to Markdown text (rust-lang/book#4272 )
- Ch. 10: Make social media discussion generic. (rust-lang/book#4249 )
- Another Ch. 17 -> 18 fix (rust-lang/book#4247 )
- Ch. 05: further tweak to wording about `user1` availability (rust-lang/book#4246 )
- Ch. 02: Fix rand version mistake (from testing) (rust-lang/book#4245 )
- Ch. 19: Correct the discussion of `fn` type and closures (rust-lang/book#4244 )
- Edition maintenance: scripting the updates for future work (rust-lang/book#4243 )
- Ch. 17: fresh-eyes edits (rust-lang/book#4242 )
- Ch. 17: drop lifetime not required in 2024 Edition (rust-lang/book#4212 )
- Appendix B, Operators: Replace “member access” with “field access” and “method call”. (rust-lang/book#4240 )
- Update to Rust 1.85 and 2024 Edition! (rust-lang/book#4241 )
- Chapter 1: fix 'four things' now that spacing is not emphasized (rust-lang/book#4239 )
- Fix typos in chapter 17 (rust-lang/book#4238 )
- NoStarch backports (rust-lang/book#4224 )
- Fix example for `cargo fix` (rust-lang/book#4226 )
- Add missing word in ch17-04-streams.md (rust-lang/book#4218 )
- Fix typo in ch5.3 and in CONTRIBUTING.md (rust-lang/book#4216 )
- chore: reformat src with dprint (rust-lang/book#4211 )
- Redirects: get rid of the weird gap in Ch. 20 sections! (rust-lang/book#4209 )
## rust-lang/edition-guide
1 commits in 5c621253d8f2a5a4adb64a6365905db67dffe3a2..9cf5443d632673c4d41edad5e8ed8be86eeb3b8f
2025-11-15 21:51:11 UTC to 2025-11-15 21:51:11 UTC
- Link to 1.56.0 and 1.85.0 blog posts (rust-lang/edition-guide#380 )
## rust-lang/nomicon
4 commits in 60f0b30d8ec1c9eb5c2582f2ec55f1094b0f8c42..0fe83ab28985b99aba36a1f0dbde3e08286fefda
2025-11-15 00:03:14 UTC to 2025-11-05 20:56:09 UTC
- Fix grammar in ffi.md (rust-lang/nomicon#510 )
- Add CITATION.cff (rust-lang/nomicon#507 )
- Use the newest Layout::array size checks for vec-alloc (rust-lang/nomicon#508 )
- review comment: dropck analysis is *not* trivial (rust-lang/nomicon#498 )
## rust-lang/reference
6 commits in e122eefff3fef362eb7e0c08fb7ffbf5f9461905..f9f1d2a4149f02582aec2f8fcdfa5b596193b4e2
2025-11-16 15:23:27 UTC to 2025-11-09 15:04:53 UTC
- add 'system' to variadic ABIs (rust-lang/reference#2069 )
- Guarantee the binary representation of `isize` explicitly (rust-lang/reference#2064 )
- Update `no_implicit_prelude` to use the attribute template (rust-lang/reference#1914 )
- Update `no_std` to use the attribute template (rust-lang/reference#1913 )
- const_eval.md: be more clear where link leads to (rust-lang/reference#2083 )
- specify s390x target features (rust-lang/reference#1972 )
## rust-lang/rust-by-example
1 commits in 160e6bbca70b0c01aa4de88d19db7fc5ff8447c3..f944161716230641605b5e3733e1c81f10047fd4
2025-11-05 12:46:38 UTC to 2025-11-05 12:46:38 UTC
- Revise `Path` type documentation for clarity (rust-lang/rust-by-example#1972 )
2025-11-17 21:48:00 +01:00
Matthias Krüger
4c59f6d87f
Rollup merge of #149030 - mkroening:doc-strict_provenance_lints, r=RalfJung
...
doc: fix `strict_provenance_lints` tracking issue link
This PR is a follow-up on https://github.com/rust-lang/rust/commit/56ee492a6e7a917b2b3f888e33dd52a13d3ecb64 and fixes the link to the `strict_provenance_lints` tracking issue.
I am not sure whether we should touch this line too:
https://github.com/rust-lang/rust/blob/66bc5a43e55eae14a2ec70b11004c88072fe7f02/compiler/rustc_lint_defs/src/builtin.rs#L2537
r? `@RalfJung`
2025-11-17 21:47:59 +01:00
Matthias Krüger
c3af6292ec
Rollup merge of #147077 - joboet:mov_kernel_copy_sys, r=ibraheemdev
...
std: move `kernel_copy` to `sys`
Part of rust-lang/rust#117276 .
The current organisation of the `kernel_copy` mechanism used to specialise `io::copy` on Linux necessitated circular links between the `io::copy` module and the implementation in `sys::pal::unix::kernel_copy`, as well as presenting an exception to the tidy PAL rule that forbids OS-based `#[cfg]`s outside of `sys` and `os`.
This PR fixes this by moving `kernel_copy` to `sys` (as per rust-lang/rust#117276 ) and returning a `CopyState` from that function specifying whether `io::copy` should use its fallback. The `kernel_copy` function on other platforms just unconditionally returns `CopyState::Fallback`.
2025-11-17 21:47:58 +01:00
Jeremy Fitzhardinge
972498c728
Build with -Zannotate-moves by default
...
Build rustc and tools with -Zannotate-moves by default. Adds toml config
options to set the annotation size limit.
This has no measurable effect on output binary size or compile time.
2025-11-17 11:01:21 -08:00
Mateusz Mikuła
203086ca6d
update my email in mailmap
2025-11-17 19:26:22 +01:00
bors
0df64c5784
Auto merge of #149032 - matthiaskrgr:rollup-28xhwxa, r=matthiaskrgr
...
Rollup of 5 pull requests
Successful merges:
- rust-lang/rust#145610 (Stabilize `char_max_len`)
- rust-lang/rust#148504 (Fix link in c_longlong documentation)
- rust-lang/rust#148698 (Fix query cycle when encounter unevaluated const)
- rust-lang/rust#148865 (move GAT inference prevention hack)
- rust-lang/rust#149016 (Document the `let this = self;` idiom used in MIR building)
r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-17 17:28:42 +00:00
Matthias Krüger
6b8f2c7938
Rollup merge of #149016 - Zalathar:let-this-self, r=Kivooeo
...
Document the `let this = self;` idiom used in MIR building
In `rustc_mir_build` there are a few `Builder` methods that start with `let this = self;`, so that subsequent code can uniformly refer to the builder as `this`, instead of having to choose between `self` at the top level or `this` when nested in closures that need to borrow the builder.
There is some existing documentation of the idiom in `expr_into_dest`:
https://github.com/rust-lang/rust/blob/69d4d5fc0e4db60272aac85ef27ecccef5764f3a/compiler/rustc_mir_build/src/builder/expr/into.rs#L32-L35
But that documentation is brief and hard to find, especially if one is unaware that such documentation even exists.
---
This PR therefore adds a longer explanation of the `let this = self;` idiom in the module documentation for `rustc_mir_build::builder`, and makes that documentation easier to find by adding a searchable tag (“LET_THIS_SELF”) to the documentation and to each occurrence of the idiom.
2025-11-17 18:07:34 +01:00
Matthias Krüger
0e0dac2efc
Rollup merge of #148865 - lcnr:gat-inference-hack, r=BoxyUwU
...
move GAT inference prevention hack
The structure of `fn assemble_and_merge_candidates` is quite messy and the differences between `Host` and `NormalizesTo` goals is large enough that we should split them entirely. Intend to change this for https://github.com/rust-lang/trait-system-refactor-initiative/issues/245 by mentoring someone: https://rust-lang.zulipchat.com/#narrow/channel/364551-t-types.2Ftrait-system-refactor/topic/ask.20for.20help/near/554696331 . Think it's still fine to merge this PR without that larger change.
fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/256
r? `@BoxyUwU`
2025-11-17 18:07:33 +01:00
Matthias Krüger
3bc1eaa66a
Rollup merge of #148698 - tiif:const_query_cycle, r=BoxyUwU
...
Fix query cycle when encounter unevaluated const
Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/249
In this PR, the environment is dropped when evaluating const that does not have any generic parameter to fix the query cycle.
2025-11-17 18:07:33 +01:00
Matthias Krüger
4e5c61e932
Rollup merge of #148504 - NeatNit:intlong, r=ibraheemdev
...
Fix link in c_longlong documentation
Ran across this mistake when reading [the documentation](https://doc.rust-lang.org/std/ffi/type.c_longlong.html ). I went through the other `.md` files in this directory and didn't spot any other errors.
**I did not check the output of this change** - I couldn't figure out how to get `cargo doc` to work and I figured it's not worth the distraction. It can't really go wrong, can it?
2025-11-17 18:07:32 +01:00
Matthias Krüger
5dd82e8ed9
Rollup merge of #145610 - GrigorenkoPV:char_max_len, r=Amanieu
...
Stabilize `char_max_len`
Tracking issue: rust-lang/rust#121714
r? t-libs-api
`@rustbot` label +needs-fcp -T-libs +T-libs-api
Closes rust-lang/rust#121714
2025-11-17 18:07:31 +01:00
rustbot
221683ca1b
Update books
2025-11-17 18:01:12 +01:00
joboet
d589d2f40b
tidy: remove obsolete exceptions from pal test
2025-11-17 17:44:21 +01:00
joboet
d870149672
std: move kernel_copy to sys
2025-11-17 17:44:21 +01:00
Martin Kröning
20fd81ebd3
doc: fix strict_provenance_lints tracking issue link
2025-11-17 17:23:55 +01:00
bors
42ebbd2356
Auto merge of #149022 - RalfJung:miri, r=RalfJung
...
miri subtree update
Contains the fix for https://github.com/rust-lang/miri/issues/4698 , which we should get shipped ASAP.
Subtree update of `miri` to https://github.com/rust-lang/miri/commit/0fea24aee002b405b79ab0dee4e6de078a586785 .
Created using https://github.com/rust-lang/josh-sync .
r? `@ghost`
2025-11-17 14:17:24 +00:00
Ralf Jung
eafd125d1f
update lockfile
2025-11-17 13:34:27 +01:00
Ralf Jung
ffac3a6a9a
Merge pull request #4702 from RalfJung/stashed-diag
...
emit stashed diagnostics before flushing delayed errors
2025-11-17 11:51:06 +00:00
Ralf Jung
daf7b0184c
emit stash diagnostics before flushing delayed errors
2025-11-17 12:26:42 +01:00
Ralf Jung
bad7d36c33
flush_delayed: add note about stashed diagnostics
2025-11-17 12:09:57 +01:00
bors
66bc5a43e5
Auto merge of #148763 - yotamofek:use-yarn, r=Kobzol
...
Use `yarn` instead of `npm` for JS/TS dependencies
Building on `@lolbinarycat` 's excellent work ( rust-lang/rust#148672 ).
`npm` apparently has certain edge-cases where it doesn't actually respect the lockfile it's fed, which has led to at least one [CI breakage](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/CI.20keeps.20failing.20because.20of.20npm.20error/near/554420543 ).
`yarn` seems to not suffer from those same issues, and also has a `--frozen` flag for its `install` command
2025-11-17 11:04:04 +00:00
Ralf Jung
18d2f462ce
Merge pull request #4630 from royAmmerschuber/pull-request/wildcard-provenance
...
initial implementation of wildcard provenence for tree borrows
2025-11-17 10:35:12 +00:00
Roy Ammerschuber
cab7fac04f
add basic wildcard provenance support to tree borrows
2025-11-17 10:57:45 +01:00
Yotam Ofek
58f034f4cf
Fix incorrect (probably copy-pasted) mod comment
2025-11-17 10:58:18 +02:00
Yotam Ofek
9561210372
Update npm package, remove another unused one, and fix some typing errors that started popping when we moved to yarn
...
Updating `es-check` managed to solve a problem about a missing type file for `minimatch` which I couldn't get around any other way
2025-11-17 10:58:18 +02:00
Yotam Ofek
3e089f2b3c
Install yarn in tidy dockerfile
2025-11-17 10:58:17 +02:00
binarycat
8acea59362
Use yarn instead of npm in tidy
2025-11-17 10:58:13 +02:00
Ralf Jung
8e39bff4e7
Merge pull request #4697 from michaliskok/genmc-llvm-dep
...
genmc: Build without LLVM; adjust to API changes
2025-11-17 07:52:11 +00:00