Skip to content

as_slice will be stable in 1.7 #728

Closed
@mcarton

Description

@mcarton

We need to decide what to do with the unstable_as_slice and unstable_as_mut_slice lints as these functions will be stable in 1.7 (ref. rust-lang/rust#30943). We could simply remove them or keep them and change their documentation to explain it’s better to use &v[..] (see rust-lang/rust#27729 for some arguments).
I think we can remove them as those functions are not inherently bad and can sometimes lead to slightly more readable code (.map(String::as_slice) vs. .map(|s| &*s) and y.happy().monkey().as_slice() vs. &(y.happy().monkey())[..]).

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