Skip to content

Explicitly specifying the type of self using the syntax self: Box<Self> is sort of vestigial. The feature of allowing Box<Self> as the type of self, along with the syntax for explicitly writing out the type of self, sort of slipped into 1.0 without anyone really considering the issue. The other syntax is strongly preferred. #83616

Closed
@haaami01

Description

@haaami01

Explicitly specifying the type of self using the syntax self: Box<Self> is sort of vestigial. The feature of allowing Box<Self> as the type of self, along with the syntax for explicitly writing out the type of self, sort of slipped into 1.0 without anyone really considering the issue. The other syntax is strongly preferred.

The explicit type syntax will probably be deprecated at some point.

Originally posted by @eefriedman in #27941 (comment)

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