Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracking Issue for range_bounds_is_empty #137300

Open
3 tasks
pitaj opened this issue Feb 20, 2025 · 2 comments
Open
3 tasks

Tracking Issue for range_bounds_is_empty #137300

pitaj opened this issue Feb 20, 2025 · 2 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@pitaj
Copy link
Contributor

pitaj commented Feb 20, 2025

Feature gate: #![feature(range_bounds_is_empty)]

This is a tracking issue for the is_empty method on RangeBounds.

Public API

// core::ops
pub trait RangeBounds<T: ?Sized> {
    ...

    fn is_empty(&self) -> bool
    where
        T: PartialOrd,
    {
        ...
    }
}

Steps / History

Unresolved Questions

  • None yet.

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

@pitaj pitaj added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Feb 20, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 27, 2025
…ct, r=ibraheemdev

add `IntoBounds::intersect` and `RangeBounds::is_empty`

- ACP: rust-lang/libs-team#539
- Tracking issue for `is_empty`: rust-lang#137300
- Tracking issue for `IntoBounds`: rust-lang#136903
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 27, 2025
…ct, r=ibraheemdev

add `IntoBounds::intersect` and `RangeBounds::is_empty`

- ACP: rust-lang/libs-team#539
- Tracking issue for `is_empty`: rust-lang#137300
- Tracking issue for `IntoBounds`: rust-lang#136903
@scottmcm
Copy link
Member

This feels like it really wants #[final] so that unsafe code can actually use it.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Feb 27, 2025
…ct, r=ibraheemdev

add `IntoBounds::intersect` and `RangeBounds::is_empty`

- ACP: rust-lang/libs-team#539
- Tracking issue for `is_empty`: rust-lang#137300
- Tracking issue for `IntoBounds`: rust-lang#136903
@pitaj
Copy link
Contributor Author

pitaj commented Feb 27, 2025

Does #[final] allow types in the same crate to still specialize? Would be kinda a shame if the infinite range types couldn't just return true.

rust-timer added a commit to rust-lang-ci/rust that referenced this issue Feb 28, 2025
Rollup merge of rust-lang#137304 - pitaj:rangebounds-is_empty-intersect, r=ibraheemdev

add `IntoBounds::intersect` and `RangeBounds::is_empty`

- ACP: rust-lang/libs-team#539
- Tracking issue for `is_empty`: rust-lang#137300
- Tracking issue for `IntoBounds`: rust-lang#136903
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this issue Mar 11, 2025
…ct, r=ibraheemdev

add `IntoBounds::intersect` and `RangeBounds::is_empty`

- ACP: rust-lang/libs-team#539
- Tracking issue for `is_empty`: rust-lang#137300
- Tracking issue for `IntoBounds`: rust-lang#136903
github-actions bot pushed a commit to tautschnig/verify-rust-std that referenced this issue Mar 11, 2025
…ct, r=ibraheemdev

add `IntoBounds::intersect` and `RangeBounds::is_empty`

- ACP: rust-lang/libs-team#539
- Tracking issue for `is_empty`: rust-lang#137300
- Tracking issue for `IntoBounds`: rust-lang#136903
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants