Skip to content

std::ops::Slice is not in the prelude #17710

Closed
@SimonSapin

Description

@SimonSapin

The slice and related methods of &[T] apparently have moved to the std::ops::Slice trait, but that trait is not in the prelude. This leads to errors such as:

error: type `&[u8]` does not implement any method in scope named `slice`

This can be “fixed” by adding use std::ops::Slice everywhere, but that doesn’t seem like the intended behavior.

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