Skip to content

RangeBounds<T> impl for Range*<&T> is missing ?Sized #64027

@talchas

Description

@talchas

Much like the impl for (Bounds<&T>, Bounds<&T>), impl<T> RangeBounds<T> for RangeFrom<&T> { could use a T: ?Sized. This would allow

let map = BTreeMap::<String, i32>::new()
map.range::<str, _>("a"..);

to compile the way it does when using Bound. (Unfortunately I think the turbofish is still needed, and I don't see any better way to use range on a String)

(Range and RangeTo of course also would want this)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-mentorCall for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions