Skip to content

Range operators are deprecated #2043

Closed
Closed
@srikwit

Description

@srikwit

This is in regards to the example provided at:
https://doc.rust-lang.org/book/ch18-03-pattern-syntax.html#matching-ranges-of-values-with-

match x {
    1...5 => println!("one through five"),
    _ => println!("something else"),
}

I am currently using rustc 1.37.0-nightly (8aa42ed7c 2019-06-24).

This will provided the following warning:

warning: `...` range patterns are deprecated
help: use `..=` for an inclusive range

Kindly update the example.

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

    Issue actions