Implement `iter::Sum` and `iter::Product` for `Option`
This is similar to the existing implementation for `Result`. It will take each item into the accumulator unless a `None` is returned.
I based a lot of this on #38580. From that discussion it didn't seem like this addition would be too controversial or difficult. One thing I still don't understand is picking the values for the `stable` attribute. This is my first non-documentation PR for rust so I am open to any feedback on improvements.
There is known issue where PowerShell is unreasonably slow downloading
files due to an issue with rendering the progress bar, see:
https://github.com/PowerShell/PowerShell/issues/2138
That issue is fixed in PowerShell Core (available in Azure Pipelines as
pwsh.exe) but it can also be worked around by setting:
$ProgressPreference = 'SilentlyContinue'
This version uses musl 1.1.22 and GCC 6.4.0 by default. It also
contains support for newer binutils and GCC versions, should we
want to bump those as well. But I'm purposefully limiting this
patch in order to reduce the surface area for controversy.
Rollup of 9 pull requests
Successful merges:
- #60742 (Allow const parameters in array sizes to be unified)
- #60756 (Add better tests for hidden lifetimes in impl trait)
- #60928 (Changes the type `mir::Mir` into `mir::Body`)
- #61024 (tests: Centralize proc macros commonly used for testing)
- #61157 (BufReader: In Seek impl, remove extra discard_buffer call)
- #61195 (Special-case `.llvm` in mangler)
- #61202 (Print PermissionExt::mode() in octal in Documentation Examples)
- #61259 (Mailmap fixes)
- #61273 (mention that MaybeUninit is a bit like Option)
Failed merges:
r? @ghost
Print PermissionExt::mode() in octal in Documentation Examples
Printing the file permission mode on unix systems in decimal feels unintuitive. Printing it in octal gives the expected form of e.g. `664`.
tests: Centralize proc macros commonly used for testing
Many proc macros in `ui\proc-macro\auxiliary` were doing same things.
(I added a fair share of those myself.)
Now commonly used macros (empty, identity, etc) are collected in one place - `ui\proc-macro\auxiliary\test-macros.rs`.
Changes the type `mir::Mir` into `mir::Body`
Fixes part 1 of #60229 (previously attempted in #60242).
I stumbled upon the issue and it seems that the previous attempt at solving it was not merged. This is a second try more up-to-date.
The commit should have changed comments as well.
At the time of writting, it passes the tidy and check tool.