Skip to content

Inlay hints for rendering applicable marker traitsΒ #14055

Open
@Veykril

Description

@Veykril

Wild idea but I think it would be nice to have something like the following:

struct Foo {
    field: Bar,
}

where we render inlay hint(s) to roughly get:

struct Foo /* implements Sized, Send, Sync, ... */{
    field: Bar,
}

for the applicable marker traits implemented by the struct.
Bit more tricky is the case where we have generics come into play, though given this is already dreamed up syntax and we can have hover tooltips for them to explain, something like the following might be good:

struct Foo<T> /* implements Sized, Send if T: Send, Sync if T: Sync, ... */{
    field: T,
}

we don't really have the things in place yet to do something like this though

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-hoverhover featureA-inlay-hintsinlay/inline hintsC-featureCategory: feature requestE-hardfunA technically challenging issue with high impact

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions