Skip to content

Tracking Issue for const_btree_len #71835

Open
@LG3696

Description

@LG3696
Contributor

This tracks stabilization of the const_btree_len feature, which allows calling the below in a constant expression:

Previously tracked here, already stable

Steps

Activity

added
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
on May 3, 2020
added
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
on May 3, 2020
added
Libs-TrackedLibs issues that are tracked on the team's project board.
on Jul 29, 2020
added 2 commits that reference this issue on Oct 31, 2020

Rollup merge of rust-lang#78581 - a1phyr:const_btree_more, r=dtolnay

6c17d12

Rollup merge of rust-lang#78581 - a1phyr:const_btree_more, r=dtolnay

3601f9d
a1phyr

a1phyr commented on Oct 31, 2020

@a1phyr
Contributor

Can the following functions be added to the top statement ?

  • BTreeMap::len
  • BTreeMap::is_empty
  • BTreeSet::len
  • BTreeSet::is_empty
changed the title [-]Tracking Issue for making `BTreeMap::new()` and `BTreeSet::new()` const functions[/-] [+]Tracking Issue for constifying some `BTreeMap` functions[/+] on Mar 18, 2021
changed the title [-]Tracking Issue for constifying some `BTreeMap` functions[/-] [+]Tracking Issue for constifying some `{BTreeMap,Set}` functions[/+] on Mar 18, 2021
tvladyslav

tvladyslav commented on Jan 9, 2022

@tvladyslav
Contributor

@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

Noratrieb commented on Aug 11, 2022

@Noratrieb
Member

What's the state of this?

JohnTitor

JohnTitor commented on Aug 11, 2022

@JohnTitor
Member

cc @rust-lang/libs-api --^

Amanieu

Amanieu commented on Aug 12, 2022

@Amanieu
Member

I'm 100% in favor of making BTreeMap::new const, but len/is_empty seem a bit much given that we don't even have those as const on Vec.

So I'm starting an FCP just for constifying the new function.

@rfcbot fcp merge

31 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-collectionsArea: `std::collections`A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCLibs-TrackedLibs issues that are tracked on the team's project board.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Amanieu@Stebalien@RalfJung@oli-obk@jplatte

        Issue actions

          Tracking Issue for const_btree_len · Issue #71835 · rust-lang/rust