Skip to content

auto-ref and auto-slice should not be mutually exclusive #3514

@nikomatsakis

Description

@nikomatsakis

Right now, if the method lookup encounters a type ~str, it will attempt to "auto-slice" it to &str, but it will not attempt to "auto-ref" to &mut ~str. This hinders us from defining methods like push_str() on strings and vectors. There is no deep reason, I just didn't see why it'd be useful. But it is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions