Commit graph

313529 commits

Author SHA1 Message Date
Chris Denton
ba1de8a8c2
Rollup merge of #149894 - ehuss:mdbook-0.5, r=Mark-Simulacrum
Update to mdbook 0.5

This updates to mdbook 0.5.2 from mdbook 0.4.52. A primary aspect of this change is that it splits the `mdbook` crate into multiple crates, and various API changes and cleanup.

There's full release notes and a migration guide at https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-050.

This also includes submodule updates:

## book

1 commits in 8c0eacd5c4acbb650497454f3a58c9e8083202a4..9c9104e8a82430f97f42e738051bda718919211c
2025-11-18 10:36:41 -0500 to 2025-12-10 11:33:49 -0500
- Update to mdbook 0.5

## edition-guide

1 commits in 9cf5443d632673c4d41edad5e8ed8be86eeb3b8f..c3c0f0b3da26610138b7ba7663f60cd2c68cf184
2025-11-15 21:51:11 +0000 to 2025-11-28 18:54:18 +0000
- Update to mdbook 0.5 (rust-lang/edition-guide#381)

## nomicon

2 commits in 0fe83ab28985b99aba36a1f0dbde3e08286fefda..9fe8fa599ad228dda74f240cc32b54bc5c1aa3e6
2025-11-15 00:03:14 +0000 to 2025-12-03 11:54:04 +0000
- Remove references to outdated unsafe code guidelines (rust-lang/nomicon#512)
- Update to mdbook 0.5 (rust-lang/nomicon#511)

## reference

5 commits in b14b4e40f53ca468beaf2f5d0dfb4f4c4ba6bc7b..50c5de90487b68d429a30cc9466dc8f5b410128f
2025-12-02 21:17:44 +0000 to 2025-12-09 22:19:05 +0000
- UB: update the extra clause for provenance UB during const evaluation (rust-lang/reference#2091)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/reference#2102)
- Clarify that omitting `nostack` is a promise from the compiler to the programmer (rust-lang/reference#1999)
- Specify that range patterns must be nonempty. (rust-lang/reference#2093)
- Update to mdbook 0.5 (rust-lang/reference#2096)

## rust-by-example

1 commits in 111cfae2f9c3a43f7b0ff8fa68c51cc8f930637c..7d21279e40e8f0e91c2a22c5148dd2d745aef8b6
2025-11-27 17:16:42 -0300 to 2025-12-01 15:02:09 -0300
- Update to mdbook 0.5 (rust-lang/rust-by-example#1977)
2025-12-14 09:18:29 +00:00
Chris Denton
2f06db1cbe
Rollup merge of #149773 - fneddy:fix_test_va_list_signext, r=Mark-Simulacrum
fix va_list test by adding a llvmir signext check

s390x has no option to directly pass 32bit values therefor i32 parameters need an optional llvmir signext attribute.
2025-12-14 09:18:29 +00:00
Chris Denton
bd747093b2
Rollup merge of #149417 - clubby789:stale-workspace-list, r=Mark-Simulacrum
tidy: Detect outdated workspaces in workspace list

Detects the case in rust-lang/rust#149415 (will pass CI once that lands).
2025-12-14 09:18:28 +00:00
Chris Denton
735c45eda4
Rollup merge of #149272 - DrAsu33:fix-vec-iter-zst-alignment-148682, r=Mark-Simulacrum
Fix vec iter zst alignment

Closes rust-lang/rust#148682
2025-12-14 09:18:28 +00:00
Chris Denton
46814a9e9c
Rollup merge of #148825 - cvengler:time_systemtime_limits, r=ChrisDenton
Add SystemTime::{MIN, MAX}

Accepted ACP: <https://github.com/rust-lang/libs-team/issues/692>
Tracking Issue: <https://github.com/rust-lang/rust/issues/149067>

---

This merge request introduces two new constants to `SystemTime`: `MIN` and `MAX`, whose values represent the maximum values for the respective data type, depending upon the platform.

Technically, this value is already obtainable during runtime with the following algorithm:
Use `SystemTime::UNIX_EPOCH` and call `checked_add` (or `checked_sub`) repeatedly with `Duration::new(0, 1)` on it, until it returns None.
Mathematically speaking, this algorithm will terminate after a finite amount of steps, yet it is impractical to run it, as it takes practically forever.

Besides, this commit also adds a unit test to verify those values represent the respective minimum and maximum, by letting a `checked_add` and `checked_sub` on it fail.

In the future, the hope of the authors lies within the creation of a `SystemTime::saturating_add` and `SystemTime::saturating_sub`, similar to the functions already present in `std::time::Duration`.
However, for those, these constants are crucially required, thereby this should be seen as the initial step towards this direction.
With this change, implementing these functions oneself outside the standard library becomes feasible in a portable manner for the first time.

This feature (and a related saturating version of `checked_{add, sub}` has been requested multiple times over the course of the past few years, most notably:
* rust-lang/rust#100141
* rust-lang/rust#133525
* rust-lang/rust#105762
* rust-lang/rust#71224
* rust-lang/rust#45448
* rust-lang/rust#52555
2025-12-14 09:18:27 +00:00
Chris Denton
01e40d6755
Rollup merge of #148755 - nxsaken:const_drop_guard, r=dtolnay
Constify `DropGuard::dismiss` and trait impls

Feature: `drop_guard` (rust-lang/rust#144426), `const_convert` (rust-lang/rust#143773), `const_drop_guard` (no tracking issue yet)

Constifies `DropGuard::dismiss` and trait impls.
I reused `const_convert` (rust-lang/rust#143773) for the `Deref*` impls.
2025-12-14 09:18:26 +00:00
bors
08de25c4ea Auto merge of #149273 - bjorn3:crate_locator_improvements, r=petrochenkov
Don't leak sysroot crates through dependencies

Previously if a dependency of the current crate depended on a sysroot crate, then `extern crate` would in the current crate would pick the first loaded version of said sysroot crate even in case of an ambiguity. This is surprising and brittle. For `-Ldependency=` we already blocked this since rust-lang/rust#110229, but the fix didn't account for sysroot crates.

Should fix https://github.com/rust-lang/rust/issues/147966
2025-12-14 09:16:11 +00:00
Lukas Wirth
30332663cb
Merge pull request #21264 from A4-Tacks/bind-unused-not-applicable-on-closure
Fix bind_unused_param applicable on closure
2025-12-14 09:13:41 +00:00
Lukas Wirth
952310251e
Merge pull request #21257 from Veykril/push-qnolwwkvuwxk
minor: Emit `WorkspaceDiagnosticRefresh` when flycheck finished
2025-12-14 09:05:23 +00:00
Lukas Wirth
560d2ec76e
Merge pull request #21253 from tris203/lsp_didSave
fix(lsp): handle dynamic registration for didSave
2025-12-14 08:56:11 +00:00
Lukas Wirth
701bb2fee1 minor: Emit WorkspaceDiagnosticRefresh when flycheck finished 2025-12-14 09:54:59 +01:00
Jesung Yang
8bd369063e fix: respect rustc's lint attribute application order
Reverse the order of returned lint attributes for a `SyntaxNode` to
match rustc's behavior.

When multiple lint attributes are present, rustc overrides earlier ones
with the last defined attribute. The previous iteration order was
incorrect, causing earlier attributes to override the later ones.
2025-12-14 06:30:09 +00:00
bors
3f4dc1e02d Auto merge of #146348 - jdonszelmann:eiiv3, r=lcnr,oli-obk
Externally implementable items

Supersedes https://github.com/rust-lang/rust/pull/140010
Tracking issue: https://github.com/rust-lang/rust/issues/125418

Getting started:

```rust
#![feature(eii)]

#[eii(eii1)]
pub fn decl1(x: u64)
// body optional (it's the default)
{
    println!("default {x}");
}

// in another crate, maybe
#[eii1]
pub fn decl2(x: u64) {
    println!("explicit {x}");
}

fn main() {
    decl1(4);
}
```

- tiny perf regression, underlying issue makes multiple things in the compiler slow, not just EII, planning to solve those separately.
- No codegen_gcc support, they don't have bindings for weak symbols yet but could
- No windows support yet for weak definitions

This PR merges the implementation of EII for just llvm + not windows, doesn't yet contain like a new panic handler implementation or alloc handler. With this implementation, it would support implementing the panic handler in terms of EII already since it requires no default implementation so no weak symbols

The PR has been open in various forms for about a year now, but I feel that having some implementation merged to build upon
2025-12-14 04:20:26 +00:00
WANG Rui
98e10289ce Enable to ping LoongArch group via triagebot 2025-12-14 10:54:27 +08:00
jyn
78337fce93
Merge pull request #2693 from reddevilmidzy/fix
Updated titles and links for two references in the bibliography
2025-12-13 18:52:41 -05:00
A4-Tacks
189a794a50
Fix bind_unused_param applicable on closure
Example
---
```rust
fn foo() {
    let _ = |$0x| 2;
}
```

**Before this PR**

```rust
fn foo() {
    let _ = x;
    let _ = |x| 2;
}
```

**After this PR**

Assist not applicable
2025-12-14 07:43:54 +08:00
Jana Dönszelmann
065e4c1c8a
ignore windows 2025-12-13 22:49:45 +01:00
bors
2cd4ee6bcf Auto merge of #149192 - gmorenz:normalize_lifetimes, r=madsmtm
NFC normalize lifetime identifiers

Fixes rust-lang/rust#126759
2025-12-13 21:47:35 +00:00
Redddy
0def1822a0
Updated titles and links for two references in the bibliography 2025-12-14 06:26:45 +09:00
Jonathan Brouwer
8fa10c0ed7
Add regression test for codegen attributes on required trait methods
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-12-13 20:19:20 +01:00
Jonathan Brouwer
ddcd55fa66
Don't allow codegen attributes on trait methods
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-12-13 20:14:14 +01:00
Chayim Refael Friedman
b3e6363a47
Merge pull request #21263 from ChayimFriedman2/format-args-args
internal: Use a generated name in old format_args lowering, instead of `args`
2025-12-13 18:21:51 +00:00
bors
430d8297c7 Auto merge of #149934 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

29 commits in 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac..e91b2baa632c0c7e84216c91ecfe107c37d887c1
2025-12-04 16:47:28 +0000 to 2025-12-13 16:29:21 +0000
- refactor(lints): move from cargo::util::lints to cargo::lints (rust-lang/cargo#16392)
- test(lint): redact more due to line got omitted (rust-lang/cargo#16391)
- feat(report): cargo report timings HTML replay (rust-lang/cargo#16377)
- feat: stabilize `-Zconfig-include` (rust-lang/cargo#16284)
- fix(package): Don't verify registry for --list  (rust-lang/cargo#16341)
- Fixed incorrect locking logic when artifact-dir == build-dir (rust-lang/cargo#16385)
- feat(log): make timing messages ready for HTML replay (rust-lang/cargo#16382)
- chore(deps): update msrv (1 version) to v1.92 (rust-lang/cargo#16381)
- Downgrade curl-sys to 0.4.83 (rust-lang/cargo#16379)
- fix(timing): more self-contained timing/log data (rust-lang/cargo#16378)
- test: update to `proc_macro::tracked::path` (rust-lang/cargo#16380)
- refactor(lint): move lints to separate modules (rust-lang/cargo#16364)
- fix(index): Apply feedback from Cargo team (rust-lang/cargo#16369)
- fix(lints): handle lints separately at ws pkg level  (rust-lang/cargo#16367)
- feat(lint): new `implicit_minimum_version_req` lint (rust-lang/cargo#16321)
- fix(info): default to local without explicit reg (rust-lang/cargo#16358)
- Remove `[no-mentions]` handler in our triagebot config (rust-lang/cargo#16361)
- Don't read the config file twice when $CARGO_HOME is a symlink (rust-lang/cargo#16325)
- fix(timings): forgot to negate filter (rust-lang/cargo#16352)
- fix(doctest): Include all search paths with new build layout  (rust-lang/cargo#16348)
- fix(layout): Remove hashes from bins in new layout  (rust-lang/cargo#16351)
- docs(faq): Include an entry on disk space (rust-lang/cargo#16349)
- feat(timings): derive concurrency data from unit data (rust-lang/cargo#16350)
- perf(layout): Use unit_id, not pkg hash, for bin/lib pkg_dirs for new layout (rust-lang/cargo#16345)
- Validate target source paths before compilation with clearer errors (rust-lang/cargo#16338)
- test(doc): Remove unused build script (rust-lang/cargo#16344)
- refactor(timings): store UnitData in RenderContext instead  (rust-lang/cargo#16346)
- perf(clean): Optimize (legacy) clean with multiple -p specifiers (rust-lang/cargo#16264)
- test: Adjust output for out-of-tree build-dir (rust-lang/cargo#16343)
2025-12-13 18:20:52 +00:00
Chayim Refael Friedman
67c0f741ef Use a generated name in old format_args lowering, instead of args
To prevent it from clashing with other names.
2025-12-13 20:12:08 +02:00
Weihang Lo
48b0f834ea
Update cargo submodule 2025-12-13 12:35:04 -05:00
Eli Ozcan
d484f9361e
Fix typo in armv7a-vex-v5 documentation 2025-12-13 17:12:28 +00:00
Tshepang Mbambo
c9301df0d7
Merge pull request #2692 from rust-lang/tshepang/fuzzing
small improvements to fuzzing.md
2025-12-13 18:27:48 +02:00
Tshepang Mbambo
cc8cfcc187 fails link checks
error: Potential incomplete link
     ┌─ fuzzing.md:41:122
     │
  41 │ > error: internal compiler error: compiler/rustc_middle/src/ty/normalize_erasing_regions.rs:195:90: Failed to normalize <[closure@src/main.rs:36:25: 36:28] as std::ops::FnOnce<(Emplacable<()>,)>>::Output, maybe try to call `try_normalize_erasing_regions` instead
     │                                                                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Did you forget to define a URL for `closure@src/main.rs:36:25: 36:28`?
2025-12-13 18:26:45 +02:00
Tshepang Mbambo
da01b354cf redundant 2025-12-13 18:22:07 +02:00
Tshepang Mbambo
86f18b3f84 use compact format, as this is what is in bootstrap.example.toml 2025-12-13 18:22:07 +02:00
Tshepang Mbambo
cc28befef1 fluff 2025-12-13 18:22:07 +02:00
Tshepang Mbambo
d8d8dbd973 feels appropriate 2025-12-13 18:22:07 +02:00
Tshepang Mbambo
6f5454a580 guidance is clear enough 2025-12-13 18:22:07 +02:00
Tshepang Mbambo
d79d0aef3c horizontal scroll is excessive for these examples 2025-12-13 18:22:07 +02:00
Jonathan Brouwer
ae39d3d9ab
Improve spans of malformed attribute errors 2025-12-13 17:13:36 +01:00
Tshepang Mbambo
a1b57f4383 remove unclear text 2025-12-13 17:39:16 +02:00
Tshepang Mbambo
cfe2be49b5 make more readable 2025-12-13 17:36:27 +02:00
Tshepang Mbambo
e513e48230
Merge pull request #2691 from rust-lang/tshepang/sembr
sembr fuzzing.md
2025-12-13 17:30:23 +02:00
Tshepang Mbambo
3d73b32634 sembr fuzzing.md 2025-12-13 17:27:53 +02:00
Tshepang Mbambo
9d62f73e87 fix corner case 2025-12-13 17:27:31 +02:00
Waffle Lapkin
cfb6a1f5c7
simplify how inline asm handles MaybeUninit 2025-12-13 15:50:02 +01:00
Tshepang Mbambo
ce0f8c9b4d test is hard to follow 2025-12-13 16:43:13 +02:00
bors
8188f6c808 Auto merge of #149709 - Urgau:overhaul-filenames, r=davidtwco
Overhaul filename handling for cross-compiler consistency

This PR overhauls the way we handle filenames in the compiler and `rmeta` in order to achieve achieve cross-compiler consistency (ie. having the same path no matter if the filename was created in the current compiler session or is coming from `rmeta`).

This is required as some parts of the compiler rely on consistent paths for the soundness of generated code (see rust-lang/rust#148328).

In order to achieved consistency multiple steps are being taken by this PR:
 - by making `RealFileName` immutable
 - by only having `SourceMap::to_real_filename` create `RealFileName`
   - currently `RealFileName` can be created from any `Path` and are remapped afterwards, which creates consistency issue
 - by also making `RealFileName` holds it's working directory, embeddable name and the remapped scopes
   - this removes the need for a `Session`, to know the current(!) scopes and cwd, which is invalid as they may not be equal to the scopes used when creating the filename

In order for `SourceMap::to_real_filename` to know which scopes to apply `FilePathMapping` now takes the current remapping scopes to apply, which makes `FileNameDisplayPreference` and company useless and are removed.

This PR is split-up in multiple commits (unfortunately not atomic), but should help review the changes.

Unblocks https://github.com/rust-lang/rust/pull/147611
Fixes https://github.com/rust-lang/rust/issues/148328
2025-12-13 14:32:09 +00:00
Tshepang Mbambo
745a0fb8d3 does not work for some reason 2025-12-13 16:24:32 +02:00
Tshepang Mbambo
dd91e00381 whitespace 2025-12-13 16:19:08 +02:00
Jonathan Brouwer
69a59e8e87
Stop using IllFormedAttributeInputLint for must_use 2025-12-13 15:14:01 +01:00
Jonathan Brouwer
6a7ed1353d
Stop using IllFormedAttributeInputLint for macro_use 2025-12-13 15:14:01 +01:00
Jonathan Brouwer
f357e51e89
Stop using IllFormedAttributeInputLint for macro_use 2025-12-13 15:13:04 +01:00
Tshepang Mbambo
06ba83ebf3
Merge pull request #2690 from rust-lang/tshepang/sembr
sembr readme
2025-12-13 16:10:19 +02:00
Tshepang Mbambo
bf1f3ebf37 point to the "main crate", instead of a list of crates 2025-12-13 16:08:32 +02:00