-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 5 pull requests #117459
Rollup of 5 pull requests #117459
Conversation
Add a few utility functions as well and extend most `mir` and `ty` ADTs to implement `PartialEq` and `Eq`.
…ng#108277) Time in UNIX system calls counts from the epoch, 1970-01-01. The timespec struct used in various system calls represents this as a number of seconds and a number of nanoseconds. Nanoseconds are required to be between 0 and 999_999_999, because the portion outside that range should be represented in the seconds field; if nanoseconds were larger than 999_999_999, the seconds field should go up instead. Suppose you ask for the time 1969-12-31, what time is that? On UNIX systems that support times before the epoch, that's seconds=-86400, one day before the epoch. But now, suppose you ask for the time 1969-12-31 23:59:00.1. In other words, a tenth of a second after one minute before the epoch. On most UNIX systems, that's represented as seconds=-60, nanoseconds=100_000_000. The macOS bug is that it returns seconds=-59, nanoseconds=-900_000_000. While that's in some sense an accurate description of the time (59.9 seconds before the epoch), that violates the invariant of the timespec data structure: nanoseconds must be between 0 and 999999999. This causes this assertion in the Rust standard library. So, on macOS, if we get a Timespec value with seconds less than or equal to zero, and nanoseconds between -999_999_999 and -1 (inclusive), we can add 1_000_000_000 to the nanoseconds and subtract 1 from the seconds, and then convert. The resulting timespec value is still accepted by macOS, and when fed back into the OS, produces the same results. (If you set a file's mtime with that timestamp, then read it back, you get back the one with negative nanoseconds again.) Co-authored-by: Josh Triplett <josh@joshtriplett.org>
…ty, r=GuillaumeGomez rustdoc: Document lack of object safety on affected traits Closes rust-lang#85138 I saw the issue didn't have any recent activity, if there is another MR for it I missed it. I want the issue to move forward so here is my proposition. It takes some space just before the "Implementors" section and only if the trait is **not** object safe since it is the only case where special care must be taken in some cases and this has the benefit of avoiding generation of HTML in (I hope) the common case.
Turn const_caller_location from a query to a hook blocked on rust-lang#117317 cc `@RalfJung`
Add a stable MIR visitor This change also adds a few utility functions as well and extend most `mir` and `ty` ADTs to implement `PartialEq` and `Eq`. Fixes rust-lang/project-stable-mir#32 r? `@oli-obk`
…er-errors prepopulate opaque ty storage before using it doesn't have any significant impact rn afaict, as we freely define new opaque types during MIR typeck. It will be relevant with rust-lang#117278 and once we stop allowing the definition of new opaques in MIR typeck r? `@compiler-errors`
…shtriplett Add support for pre-unix-epoch file dates on Apple platforms (rust-lang#108277) Please note that even though the assertion being hit is the same on MacOS and thus similar to what's described in rust-lang#108277, on MacOS it's possible to convert the numbers such that they are valid, don't hit the assertion and are round-trippable. Doing so effectively fixes the issue on Apple platforms. This PR does not attempt to harden other platforms against negative nanoseconds, which can happen for many reasons including mild filesystem corruption. ---- Time in UNIX system calls counts from the epoch, 1970-01-01. The timespec struct used in various system calls represents this as a number of seconds and a number of nanoseconds. Nanoseconds are required to be between 0 and 999_999_999, because the portion outside that range should be represented in the seconds field; if nanoseconds were larger than 999_999_999, the seconds field should go up instead. Suppose you ask for the time 1969-12-31, what time is that? On UNIX systems that support times before the epoch, that's seconds=-86400, one day before the epoch. But now, suppose you ask for the time 1969-12-31 23:59:00.1. In other words, a tenth of a second after one minute before the epoch. On most UNIX systems, that's represented as seconds=-60, nanoseconds=100_000_000. The macOS bug is that it returns seconds=-59, nanoseconds=-900_000_000. While that's in some sense an accurate description of the time (59.9 seconds before the epoch), that violates the invariant of the timespec data structure: nanoseconds must be between 0 and 999999999. This causes this assertion in the Rust standard library. So, on macOS, if we get a Timespec value with seconds less than or equal to zero, and nanoseconds between -999_999_999 and -1 (inclusive), we can add 1_000_000_000 to the nanoseconds and subtract 1 from the seconds, and then convert. The resulting timespec value is still accepted by macOS, and when fed back into the OS, produces the same results. (If you set a file's mtime with that timestamp, then read it back, you get back the one with negative nanoseconds again.) Co-authored-by: Josh Triplett <josh@joshtriplett.org>
@bors r+ rollup=never p=5 |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#113241 (rustdoc: Document lack of object safety on affected traits) - rust-lang#117388 (Turn const_caller_location from a query to a hook) - rust-lang#117417 (Add a stable MIR visitor) - rust-lang#117439 (prepopulate opaque ty storage before using it) - rust-lang#117451 (Add support for pre-unix-epoch file dates on Apple platforms (rust-lang#108277)) r? `@ghost` `@rustbot` modify labels: rollup
💔 Test failed - checks-actions |
@bors retry |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 9d83ac2179 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (09ac6e4): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDNext Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 638.452s -> 638.855s (0.06%) |
78: Automated pull from upstream `master` r=tshepang a=github-actions[bot] This PR pulls the following changes from the upstream repository: * rust-lang/rust#113970 * rust-lang/rust#117459 * rust-lang/rust#117451 * rust-lang/rust#117439 * rust-lang/rust#117417 * rust-lang/rust#117388 * rust-lang/rust#113241 * rust-lang/rust#117462 * rust-lang/rust#117450 * rust-lang/rust#117407 * rust-lang/rust#117444 * rust-lang/rust#117438 * rust-lang/rust#117421 * rust-lang/rust#117416 * rust-lang/rust#116712 * rust-lang/rust#116267 * rust-lang/rust#117377 * rust-lang/rust#117419 Co-authored-by: Alexis (Poliorcetics) Bourget <ab_github@poliorcetiq.eu> Co-authored-by: Esteban Küber <esteban@kuber.com.ar> Co-authored-by: David Tolnay <dtolnay@gmail.com> Co-authored-by: Celina G. Val <celinval@amazon.com> Co-authored-by: Michael Goulet <michael@errs.io> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: Camille GILLOT <gillot.camille@gmail.com> Co-authored-by: lcnr <rust@lcnr.de> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com> Co-authored-by: Oli Scherer <git-spam-no-reply9815368754983@oli-obk.de>
@rustbot label: +perf-regression-triaged |
Successful merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup