Uh oh!
There was an error while loading. Please reload this page.
Rollup of 8 pull requests - #101152
Conversation
We have `File::create` for creating a file or opening an existing file, but the secure way to guarantee creating a new file requires a longhand invocation via `OpenOptions`. Add `File::create_new` to handle this case, to make it easier for people to do secure file creation.
...replacing `.cast().wrapping_offset().cast()` & similar code.
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
Add MaybeUninit memset test Closesrust-lang#96274
Add a `File::create_new` constructor We have `File::create` for creating a file or opening an existing file, but the secure way to guarantee creating a new file requires a longhand invocation via `OpenOptions`. Add `File::create_new` to handle this case, to make it easier for people to do secure file creation.
…r-errors Remove separate indexing of early-bound regions ~Based on rust-lang#99728 This PR copies some modifications from rust-lang#97839 around object lifetime defaults. These modifications allow to stop counting generic parameters during lifetime resolution, and rely on the indexing given by `rustc_typeck::collect`.
remove an ineffective check in const_prop Based on rust-lang#100043, only the last two commits are new. ConstProp has a special check when reading from a local that prevents reading uninit locals. However, if that local flows into `force_allocation`, then no check fires and evaluation proceeds. So this check is not really effective at preventing accesses to uninit locals. With rust-lang#100043, `read_immediate` and friends always fail when reading uninit locals, so I don't see why ConstProp would need a separate check. Thus I propose we remove it. This is needed to be able to do rust-lang#100085.
…g, r=JohnTitor Stabilize `std::io::read_to_string` Closesrust-lang#80218. 🎉 This PR stabilizes the `std::io::read_to_string` function, with the following public API: ```rust pub fn read_to_string<R: Read>(reader: R) -> Result<String>; ``` It's analogous to `std::fs::read_to_string` for files, but it works on anything that implements `io::Read`, including `io::stdin()`. See the tracking issue (rust-lang#80218) or documentation for details.
… r=scottmcm
Make use of `[wrapping_]byte_{add,sub}`
These new methods trivially replace old `.cast().wrapping_offset().cast()` & similar code.
Note that [`arith_offset`](https://doc.rust-lang.org/std/intrinsics/fn.arith_offset.html) and `wrapping_offset` are the same thing.
r? ``@scottmcm``
_split off from #100746_…ark-Simulacrum Remove a panicking branch from `fmt::builders::PadAdapter`
Separate CountIsStar from CountIsParam in rustc_parse_format.
`rustc_parse_format`'s parser would result in the exact same output for `{:.*}` and `{:.0$}`, making it hard for diagnostics to handle these cases properly.
This splits those cases by adding a new `CountIsStar` enum variant.
This fixesrust-lang#100995
Prerequisite for rust-lang#100996Dylan-DPC
commented
Aug 29, 2022
@bors retry spurious |
rust-log-analyzer
commented
Aug 29, 2022
The job Click to see the possible cause of the failure (guessed by this bot) |
bors
commented
Aug 29, 2022
bors
commented
Aug 29, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
Aug 29, 2022
📌 Perf builds for each rolled up PR: previous master: fcc2bddd26 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
rust-timer
commented
Aug 29, 2022
Finished benchmarking commit (bc4b39c): 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.
Footnotes |
nnethercote
commented
Aug 30, 2022
@rust-timer build 598629adb937afc7096511b6007db166eb6fe6e6 |
rust-timer
commented
Aug 30, 2022
Queued 598629adb937afc7096511b6007db166eb6fe6e6 with parent fcc2bdd, future comparison URL. |
nnethercote
commented
Aug 30, 2022
@rust-timer build 9c74cb3c63daa7e254a78a7695f6cf84ea5476c8 |
nnethercote
commented
Aug 30, 2022
Looks like the second build command didn't work. I think I was supposed to put both in the same comment. I can redo the second build command once the first perf run is complete. |
rust-timer
commented
Aug 30, 2022
Finished benchmarking commit (598629adb937afc7096511b6007db166eb6fe6e6): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never 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.
Footnotes |
nnethercote
commented
Aug 30, 2022
No need to run the second one, because the first run matches up almost perfectly with the run for the entire rollup. Which means that #99821 is responsible for all the improvements and regressions for this rollup. |
Successful merges:
File::create_newconstructor #98801 (Add aFile::create_newconstructor)std::io::read_to_string#100337 (Stabilizestd::io::read_to_string)[wrapping_]byte_{add,sub}#100819 (Make use of[wrapping_]byte_{add,sub})fmt::builders::PadAdapter#100934 (Remove a panicking branch fromfmt::builders::PadAdapter)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup