-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Rollup of 10 pull requests #149890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Rollup of 10 pull requests #149890
+1,830
−1,094
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is useful for changing the *default* for whether doctests are merged or not. Currently, that default is solely controlled by `edition = 2024`, which adds a high switching cost to get doctest merging. This flag allows opt-ing in even on earlier additions. Unlike the `edition = 2024` default, `--merge-doctests=yes` gives a hard error if merging fails instead of falling back to running standalone tests. The user has explicitly said they want merging, so we shouldn't silently do something else. `--merge-doctests=auto` is equivalent to the current 2024 edition behavior, but available on earlier editions.
This allows viewing failed merged doctests.
… to show/hide implementors
…xternal macro
```
error[E0308]: mismatched types
--> $DIR/macro-span-caller-replacement.rs:5:17
|
LL | s = format!("{arg}");
| ^^^^^^^^^^^^^^^^ expected `&str`, found `String`
...
LL | macro_with_format!();
| -------------------- in this macro invocation
|
= note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info)
```
… from desugaring
This commit introduces two new constants to SystemTime: `MIN` and `MAX`, whose value 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. Concrete implementation depending upon the platform is done in later commits. 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. Below are platform specifc notes: # Hermit The HermitOS implementation is more or less identitcal to the Unix one. # sgx The implementation uses a `Duration` to store the Unix time, thereby implying `Duration::ZERO` and `Duration::MAX` as the limits. # solid The implementation uses a `time_t` to store the system time within a single value (i.e. no dual secs/nanosecs handling), thereby implying its `::MIN` and `::MAX` values as the respective boundaries. # UEFI UEFI has a weird way to store times, i.e. a very complicated struct. The standard proclaims "1900-01-01T00:00:00+0000" to be the lowest possible value and `MAX_UEFI_TIME` is already present for the upper limit. # Windows Windows is weird. The Win32 documentation makes no statement on a maximum value here. Next to this, there are two conflicting types: `SYSTEMTIME` and `FILETIME`. Rust's Standard Library uses `FILETIME`, whose limit will (probably) be `i64::MAX` packed into two integers. However, `SYSTEMTIME` has a lower-limit. # xous It is similar to sgx in the sense of using a `Duration`. # unsupported Unsupported platforms store a `SystemTime` in a `Duration`, just like sgx, thereby implying `Duration::ZERO` and `Duration::MAX` as the respective limits.
…=yotamofek Put negative implementors first and apply same ordering logic to foreign implementors Fixes rust-lang#51129. This PR changeda surprisingly small amount of things to put negative trait impls before the others: basically just adding a new information in the generated JS file for foreign implementors and a "negative marker" DOM element to know where to insert negative impls. I also used this occasion to make the foreign implementors sort the same as the local ones by using `compare_names`. You can test it [here](https://rustdoc.crud.net/imperio/neg-implementors/core/marker/trait.Sync.html#implementors). r? ``@notriddle``
…aumeGomez remove duplicated columns from `rustc_error_code::error_codes!` Possible because of rust-lang#146308 ~~, but currently still blocked on the next stage0 bump~~.
…nkov Point at span within local macros even when error happens in nested external macro Address issue noticed at https://users.rust-lang.org/t/error-message-does-not-specify-where-in-macro/135157/1. On errors occurring within a macro expansion, point at the innermost local macro expansion point. ``` error[E0308]: mismatched types --> $DIR/macro-span-caller-replacement.rs:5:17 | LL | s = format!("{arg}"); | ^^^^^^^^^^^^^^^^ expected `&str`, found `String` ... LL | macro_with_format!(); | -------------------- in this macro invocation | = note: this error originates in the macro `format` which comes from the expansion of the macro `macro_with_format` (in Nightly builds, run with -Z macro-backtrace for more info) ```
…=ChrisDenton
Add SystemTime::{MIN, MAX}
Accepted ACP: <rust-lang/libs-team#692>
Tracking Issue: <rust-lang#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#100141
* rust-lang#133525
* rust-lang#105762
* rust-lang#71224
* rust-lang#45448
* rust-lang#52555
…iddle rustdoc: Add unstable `--merge-doctests=yes/no/auto` flag This is useful for changing the *default* for whether doctests are merged or not. Currently, that default is solely controlled by `edition = 2024`, which adds a high switching cost to get doctest merging. This flag allows opting in even on earlier editions. Unlike the `edition = 2024` default, `--merge-doctests=yes` gives a hard error if merging fails instead of falling back to running standalone tests. The user has explicitly said they want merging, so we shouldn't silently do something else. `--merge-doctests=auto` is equivalent to the current 2024 edition behavior, but available on earlier editions. Helps with rust-lang#141240. `@epage` said in that issue he would like a per-doctest opt-in, and that seems useful to me in addition to this flag, but I think it's a separate use case from changing the default.
…eLapkin Rename some issue-* tests Also fixes one incorrect issue number: rust-lang#100168 (comment)
Use ubuntu:24.04 for the `x86_64-gnu-miri` job Ralf asked for this in https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Adding.20a.20C.2B.2B.20dependency.20to.20Miri.3F/with/560654845.
…yotamofek Remove "tidy" tool for `tests/rustdoc` testsuite As discussed in the [last rustdoc meeting](https://rust-lang.zulipchat.com/#narrow/channel/393423-t-rustdoc.2Fmeetings/topic/2025-12-08/near/562554410), it seems like the current `tidy` tool is not used much for the `rustdoc` testsuite by the rustdoc contributors as it doesn't fit nicely our needs. Until we find something better, we decided to remove it. r? ``@yotamofek``
Do not suggest moving expression out of for loop when hitting `break` from desugaring Fix rust-lang#149861.
only resolve main in bin crates Fixes rust-lang#149412
Contributor
Author
|
@bors r+ rollup=never p=5 |
Collaborator
Collaborator
bors
added a commit
that referenced
this pull request
Dec 11, 2025
…uwer Rollup of 10 pull requests Successful merges: - #142380 (Put negative implementors first and apply same ordering logic to foreign implementors) - #146584 (remove duplicated columns from `rustc_error_code::error_codes!`) - #148717 (Point at span within local macros even when error happens in nested external macro) - #148825 (Add SystemTime::{MIN, MAX}) - #149565 (rustdoc: Add unstable `--merge-doctests=yes/no/auto` flag) - #149770 (Rename some issue-* tests) - #149807 (Use ubuntu:24.04 for the `x86_64-gnu-miri` job) - #149850 (Remove "tidy" tool for `tests/rustdoc` testsuite) - #149863 (Do not suggest moving expression out of for loop when hitting `break` from desugaring) - #149867 (only resolve main in bin crates) r? `@ghost` `@rustbot` modify labels: rollup
Contributor
Author
|
This is my first time making a rollup, seems pretty easy but let me know if I fucked anything up 🤞 |
Collaborator
|
💔 Test failed - checks-actions |
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-CI
Area: Our Github Actions CI
A-compiletest
Area: The compiletest test runner
A-run-make
Area: port run-make Makefiles to rmake.rs
A-testsuite
Area: The testsuite used to check the correctness of rustc
A-tidy
Area: The tidy tool
O-hermit
Operating System: Hermit
O-SGX
Target: SGX
O-solid
Operating System: SOLID
O-unix
Operating system: Unix-like
O-windows
Operating system: Windows
rollup
A PR which is a rollup
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-infra
Relevant to the infrastructure team, which will review and decide on the PR/issue.
T-libs
Relevant to the library team, which will review and decide on the PR/issue.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
T-rustdoc-frontend
Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
rustc_error_code::error_codes!#146584 (remove duplicated columns fromrustc_error_code::error_codes!)--merge-doctests=yes/no/autoflag #149565 (rustdoc: Add unstable--merge-doctests=yes/no/autoflag)x86_64-gnu-mirijob #149807 (Use ubuntu:24.04 for thex86_64-gnu-mirijob)tests/rustdoctestsuite #149850 (Remove "tidy" tool fortests/rustdoctestsuite)breakfrom desugaring #149863 (Do not suggest moving expression out of for loop when hittingbreakfrom desugaring)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup