Open
Description
This tracks stabilization of the const_btree_len
feature, which allows calling the below in a constant expression:
BTree{Map,Set}::{len,is_empty}()
(Constantify more BTreeMap and BTreeSet functions #78581)
Previously tracked here, already stable
BTree{Map,Set}::new()
(Make BTreeMap::new and BTreeSet::new const #71839)
Steps
- Implementation Make BTreeMap::new and BTreeSet::new const #71839Stabilization PR
Metadata
Metadata
Assignees
Labels
Area: `std::collections`Area: Constant evaluation, covers all const contexts (static, const fn, ...)Category: An issue tracking the progress of sth. like the implementation of an RFCLibs issues that are tracked on the team's project board.Relevant to the library API team, which will review and decide on the PR/issue.This issue / PR is in PFCP or FCP with a disposition to merge it.The final comment period is finished for this PR / Issue.
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Rollup merge of rust-lang#78581 - a1phyr:const_btree_more, r=dtolnay
Rollup merge of rust-lang#78581 - a1phyr:const_btree_more, r=dtolnay
a1phyr commentedon Oct 31, 2020
Can the following functions be added to the top statement ?
BTreeMap::len
BTreeMap::is_empty
BTreeSet::len
BTreeSet::is_empty
[-]Tracking Issue for making `BTreeMap::new()` and `BTreeSet::new()` const functions[/-][+]Tracking Issue for constifying some `BTreeMap` functions[/+][-]Tracking Issue for constifying some `BTreeMap` functions[/-][+]Tracking Issue for constifying some `{BTreeMap,Set}` functions[/+]tvladyslav commentedon Jan 9, 2022
@jonas-schievink @JohnTitor , could you please start FCP?
I'm about to add closing PR. There were some tests added in #71839 and #78581 but now they are gone. Should I add more tests?
Noratrieb commentedon Aug 11, 2022
What's the state of this?
JohnTitor commentedon Aug 11, 2022
cc @rust-lang/libs-api --^
Amanieu commentedon Aug 12, 2022
I'm 100% in favor of making
BTreeMap::new
const, butlen
/is_empty
seem a bit much given that we don't even have those as const onVec
.So I'm starting an FCP just for constifying the
new
function.@rfcbot fcp merge
31 remaining items