-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Rollup of 11 pull requests #141688
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 11 pull requests #141688
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
It uses the file metadata on Unix with a fallback for files incorrectly reported as zero-sized. It uses `GetFileSizeEx` on Windows. This reduces the number of syscalls needed for determining the file size of an open file from 3 to 1.
It can only describe the inner workings of the default implementation, other implementations might not be implemented using seeks at all.
This adds running of cargo's tests to the aarch64-apple-darwin job. The reason for this is that tier-1 targets are ostensibly supposed to run tests for host tools, but we are not doing that here. We do have fairly good coverage in Cargo's CI, but we don't have much coverage of beta or stable. I think it would be good to have a fallback here.
Would otherwise fail on: ``` thread 'fs::tests::test_eq_windows_file_type' panicked at library/std/src/test_helpers.rs:53:20: called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } ``` This came from the read-only attribute set on the test file. In order to fix this, instead of simply disabling the test, the attribute is reset before the test's end so it may still run successfully. Signed-off-by: Paul Mabileau <paul.mabileau@harfanglab.fr>
…nton Optimize `Seek::stream_len` impl for `File` It uses the file metadata on Unix with a fallback for files incorrectly reported as zero-sized. It uses `GetFileSizeEx` on Windows. This reduces the number of syscalls needed for determining the file size of an open file from 3 to 1.
…ross,bjorn3 Stabilize `repr128` ## Stabilisation report The `repr128` feature ([tracking issue](rust-lang#56071)) allows the use of `#[repr(u128)]` and `#[repr(i128)]` on enums in the same way that other primitive representations such as `#[repr(u64)]` can be used. For example: ```rust #[repr(u128)] enum Foo { One = 1, Two, Big = u128::MAX, } #[repr(i128)] enum Bar { HasThing(u16) = 42, HasSomethingElse(i64) = u64::MAX as i128 + 1, HasNothing, } ``` This is the final part of adding 128-bit integers to Rust ([RFC 1504](https://rust-lang.github.io/rfcs/1504-int128.html)); all other parts of 128-bit integer support were stabilised in rust-lang#49101 back in 2018. From a design perspective, `#[repr(u128)]`/`#[repr(i128)]` function like `#[repr(u64)]`/`#[repr(i64)]` but for 128-bit integers instead of 64-bit integers. The only differences are: - FFI safety: as `u128`/`i128` are not currently considered FFI safe, neither are `#[repr(u128)]`/`#[repr(i128)]` enums (I discovered this wasn't the case while drafting this stabilisation report, so I have submitted rust-lang#138282 to fix this). - Debug info: while none of the major debuggers currently support 128-bit integers, as of LLVM 20 `rustc` will emit valid debuginfo for both DWARF and PDB (PDB makes use of the same natvis that is also used for all enums with fields, whereas DWARF has native support). Tests for `#[repr(u128)]`/`#[repr(i128)]` enums include: - [ui/enum-discriminant/repr128.rs](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/ui/enum-discriminant/repr128.rs): checks that 128-bit enum discriminants have the correct values. - [debuginfo/msvc-pretty-enums.rs](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/debuginfo/msvc-pretty-enums.rs): checks the PDB debuginfo is correct. - [run-make/repr128-dwarf](https://github.com/rust-lang/rust/blob/385970f0c1fd0c09bac426b02f38300c0b1ba9a2/tests/run-make/repr128-dwarf/rmake.rs): checks the DWARF debuginfo is correct. Stabilising this feature does not require any changes to the Rust Reference as [the documentation on primitive representations](https://doc.rust-lang.org/nightly/reference/type-layout.html#r-layout.repr.primitive.intro) already includes `u128` and `i128`. Closes rust-lang#56071 Closes rust-lang/reference#1368 r? lang `@rustbot` label +I-lang-nominated +T-lang
…_file_type, r=ChrisDenton Test(fs): Fix `test_eq_windows_file_type` for Windows 7 Would otherwise fail on: ``` thread 'fs::tests::test_eq_windows_file_type' panicked at library/std/src/test_helpers.rs:53:20: called `Result::unwrap()` on an `Err` value: Os { code: 5, kind: PermissionDenied, message: "Access is denied." } ``` This came from the read-only attribute set on the test file. In order to fix this, instead of simply disabling the test, the attribute is reset before the test's end so it may still run successfully. `@rustbot` label T-libs A-filesystem A-testsuite O-windows-7 O-windows-msvc
Path::with_extension: show that it adds an extension where one did no… …t exist I think the times I encountered this, I had to check first if files without extensions were added, since all examples only had files with existing extensions. Also, this replaced example already has a similar example below.
clean up old rintf leftovers As usual stdarch needed special treatment due to rust-lang/stdarch#1655, and apparently I forgot to clean up these leftovers here. They can be removed now.
coretests: extend and simplify float tests Also de-duplicate tests by removing a ui test that duplicates the tests in core. r? `@tgross35`
…=Kobzol ci: move tests from x86_64-gnu-llvm-19 job to aarch64
Call out possibility of invariant result in variance markers ref rust-lang#135806 (comment)
ci: verify that codebuild jobs use ghcr.io
…ieni,jieyouxu CI: Add cargo tests to aarch64-apple-darwin This adds running of cargo's tests to the aarch64-apple-darwin job. The reason for this is that tier-1 targets are ostensibly supposed to run tests for host tools, but we are not doing that here. We do have fairly good coverage in Cargo's CI, but we don't cover the beta or stable branches here. I think it would be good to have a fallback here. I think this should only add about 7 minutes of CI time, but I have not measured it. The current job is about 1.5 hours. In summary of the tier-1 targets: | Target | rust-lang/cargo | rust-lang/rust | |--------|-----------------|----------------| | aarch64-apple-darwin | stable/nightly | ❌ (this PR) | | aarch64-unknown-linux-gnu | stable/nightly | ✓ | | x86_64-apple-darwin | nightly | ❌ | | x86_64-pc-windows-gnu | nightly | ❌ | | x86_64-pc-windows-msvc | stable | ✓ | | x86_64-unknown-linux-gnu | stable/beta/nightly | ✓ | | i686-pc-windows-msvc | ❌ | ❌ | | i686-unknown-linux-gnu | ❌ | ❌ | try-job: aarch64-apple
interpret/allocation: Fixup type for `alloc_bytes` This can be `FnOnce`, which helps us avoid an extra clone in rust-lang/miri#4343 r? RalfJung
@bors r+ rollup=never p=6 (includes a p=5) |
The job Click to see the possible cause of the failure (guessed by this bot)
|
@bors r- |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-run-make
Area: port run-make Makefiles to rmake.rs
A-rustdoc-json
Area: Rustdoc JSON backend
A-testsuite
Area: The testsuite used to check the correctness of rustc
A-tidy
Area: The tidy tool
O-windows
Operating system: Windows
rollup
A PR which is a rollup
S-waiting-on-author
Status: This is awaiting some action (such as code changes or more information) from the author.
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.
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:
Seek::stream_len
impl forFile
#125087 (OptimizeSeek::stream_len
impl forFile
)repr128
#138285 (Stabilizerepr128
)test_eq_windows_file_type
for Windows 7 #141104 (Test(fs): Fixtest_eq_windows_file_type
for Windows 7)alloc_bytes
#141682 (interpret/allocation: Fixup type foralloc_bytes
)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup