Skip to content

Better error message about [T] as a bare type (and in general) #12347

Closed
@SimonSapin

Description

@SimonSapin

From twitter:

Compilers really need to make suggestions about what can be done to resolve an error. e.g. for rustc the compiler complains about using T[] as a bare type. Should suggest that you need to use ~, etc. otherwise the error is very opaque.

https://twitter.com/alex_gaynor/status/435446756264779777
https://twitter.com/alex_gaynor/status/435446869452263424

This bug is not only about giving a better error message for this specific case, but also about giving suggestions in general.

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