-
Couldn't load subscription status.
- Fork 13.9k
Rollup of 5 pull requests #99412
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 #99412
Conversation
Usually opening a file handle with access set to metadata only will always succeed, even if the file is locked. However some special system files, such as `C:\hiberfil.sys`, are locked by the system in a way that denies even that. So as a fallback we try reading the cached metadata from the directory.
… r=thomcc Add assertion that `transmute_copy`'s U is not larger than T This is called out as a safety requirement in the docs, but because knowing this can be done at compile time and constant folded (just like the `align_of` branch is removed), we can just panic here. I've looked at the asm (using `cargo-asm`) of a function that both is correct and incorrect, and the panic is completely removed, or is unconditional, without needing build-std. I don't expect this to cause much breakage in the wild. I scanned through https://miri.saethlin.dev/ub for issues that would look like this (error: Undefined Behavior: memory access failed: alloc1768 has size 1, so pointer to 8 bytes starting at offset 0 is out-of-bounds), but couldn't find any. That doesn't rule out it happening in crates tested that fail earlier for some other reason, though, but it indicates that doing this is rare, if it happens at all. A crater run for this would need to be build and test, since this is a runtime thing. Also added a few more transmute_copy tests.
Windows: Use `FindFirstFileW` for getting the metadata of locked system files Fixes rust-lang#96980 Usually opening a file handle with access set to metadata only will always succeed, even if the file is locked. However some special system files, such as `C:\hiberfil.sys`, are locked by the system in a way that denies even that. So as a fallback we try reading the cached metadata from the directory. Note that the test is a bit iffy. I don't know if `hiberfil.sys` actually exists in the CI. r? rust-lang/libs
add missing null ptr check in alloc example `alloc` can return null on OOM, if I understood correctly. So we should never just deref a pointer we get from `alloc`.
…r=oli-obk Do not allow typeck children items to constrain outer RPITs Fixes rust-lang#99073 in a simpler and more conservative way than rust-lang#99079. Simply raise a mismatched types error if we try to constrain an RPIT in an item that isn't the RPIT's parent. r? `@oli-obk`
interpret/visitor: add missing early return I forgot to add this when adding the special `Box` handling branch. r? ``@oli-obk``
|
@bors r+ rollup=never p=5 |
|
⌛ Testing commit 0f29bef with merge da09b8cb29e53a24470af42d9d087ec506448127... |
|
💔 Test failed - checks-actions |
|
@bors retry spurious |
|
⌛ Testing commit 0f29bef with merge ad1c57613a24cbbe94f0bc1f41ef5976a30bde24... |
|
💔 Test failed - checks-actions |
|
Caused by #98916 |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Successful merges:
transmute_copy's U is not larger than T #98839 (Add assertion thattransmute_copy's U is not larger than T)FindFirstFileWfor getting the metadata of locked system files #98916 (Windows: UseFindFirstFileWfor getting the metadata of locked system files)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup