]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #73930 - a1phyr:feature_const_option, r=dtolnay
authorManish Goregaokar <manishsmail@gmail.com>
Fri, 17 Jul 2020 21:09:02 +0000 (14:09 -0700)
committerGitHub <noreply@github.com>
Fri, 17 Jul 2020 21:09:02 +0000 (14:09 -0700)
commitf6cd31c3b71139a301b23ad6107a5e0560bc3fe7
treee5a54f2f3c06668bbde3ece55a4d44f25e1cf127
parent3006ea3560b454404a653a0677a3d03790d5455b
parente7d9944e205dc59f1174b584cd8ed41deced9646
Rollup merge of #73930 - a1phyr:feature_const_option, r=dtolnay

Make some Option methods const

Tracking issue: #67441

Constantify the following methods of `Option`:
- `as_ref`
- `is_some`
- `is_none`
- `iter` (not sure about this one, but it is possible, and will be useful when const traits are a thing)

cc @rust-lang/wg-const-eval @rust-lang/libs
src/libcore/lib.rs
src/libcore/option.rs