Skip to content

Explicit self type annotation breaks inlay hints in free-function-style calls #6400

@Veetaha

Description

@Veetaha
trait Foo {
    fn foo(self: Self);
}

impl Foo for () {
    fn foo(self) {}
}


fn main() {
    <()>::foo(());
}

Notice the extra : Self: part at the call site. This works with any kind of Self (Box<Self>, Arc<Self>, etc.).

image

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