Skip to content

Step::replace_zero actually replaces it with one #41492

Closed
@scottmcm

Description

@scottmcm
Member

Repro (nightly 2017-04-22):

#![feature(step_trait)]
use std::iter::Step;
fn main() {
    let mut x = 3;
    x.replace_zero();
    assert_eq!(x, 0);
}

Actual:

assertion failed: `(left == right)` (left: `1`, right: `0`)

Activity

scottmcm

scottmcm commented on Apr 24, 2017

@scottmcm
MemberAuthor
added 2 commits that reference this issue on Apr 25, 2017

Rollup merge of rust-lang#41493 - scottmcm:fix-step-replace, r=sfackler

Rollup merge of rust-lang#41493 - scottmcm:fix-step-replace, r=sfackler

added 2 commits that reference this issue on Apr 26, 2017

Rollup merge of rust-lang#41493 - scottmcm:fix-step-replace, r=sfackler

Rollup merge of rust-lang#41493 - scottmcm:fix-step-replace, r=sfackler

added 2 commits that reference this issue on Apr 26, 2017

Rollup merge of rust-lang#41493 - scottmcm:fix-step-replace, r=sfackler

Rollup merge of rust-lang#41493 - scottmcm:fix-step-replace, r=sfackler

scottmcm

scottmcm commented on Apr 28, 2017

@scottmcm
MemberAuthor

Passes on nightly (94e884b 2017-04-27)

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @scottmcm

        Issue actions

          Step::replace_zero actually replaces it with one · Issue #41492 · rust-lang/rust