]> git.lizzy.rs Git - rust.git/commit - src/tools/rustfmt
Rollup merge of #82130 - jhpratt:const-option-result, r=RalfJung
authorYuki Okushi <huyuumi.dev@gmail.com>
Sun, 7 Mar 2021 01:41:09 +0000 (10:41 +0900)
committerGitHub <noreply@github.com>
Sun, 7 Mar 2021 01:41:09 +0000 (10:41 +0900)
commit0adc1965218bb24290c74f680d94c20799ff8f70
tree6fc08a14292d837ed3145c579895c6f91fb36d7e
parentd1dc16623f9e143ec67b41e8392ae8906abb44e0
parent79c2b75e88bdab5fccd7d63750ef11aff2f8eaba
Rollup merge of #82130 - jhpratt:const-option-result, r=RalfJung

Make some Option, Result methods unstably const

The following methods are now unstably const:

- Option::transpose
- Option::flatten
- Result::flatten

While some methods for could likely be made `const` in the future, nearly all of them require something to be dropped at compile-time, which isn't currently supported. The functions listed above should have a trivial path to stabilization.
library/core/src/option.rs
library/core/src/result.rs