rust-lang / rust-lang/rust

Tracking Issue for Iterator::contains

Open
#127,494 11 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

C-tracking-issue T-libs
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

Feature gate: #![feature(iter_contains)]

This is a tracking issue for a method of the Iterator trait that checks whether an iterator contains an item.

A method of the iterator trait to check whether it contains an element.
It goes over all the elements in the iterator and checks if they are in the collection.

Public API
fn contains<Q: ?Sized>(&mut self, item: Q) -> bool
    where
        Q: PartialEq<Self::Item>,
        Self: Sized,
Steps / History
Unresolved Questions
  • None yet.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the proposed Iterator::contains API and review the linked ACP and implementation issue #135018. The tracking issue records that implementation is still unchecked and that final comment period and stabilization remain; done requires completing the feature lifecycle rather than a single code edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.