Skip to content

Add sugar v[a .. b] be sugar for vec.slice and str.slice #4160

Description

@erickt

** UPDATE by @nikomatsakis **

Closed in favor of this RFC repo issue: rust-lang/rfcs#13

** ORIGINAL **

@graydon said in irc today:

graydon: I would like foo[a..b] to work for slicing, tbh
graydon: I mean, if the square brackets (arguably some of the nicest symbols available in ascii) are stolen for vecs, we might as well use them as thoroughly as we can

Activity

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

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions