Skip to content

E0599 error message may suggest syntactically invalid fix #65284

Closed
@Rantanen

Description

@Rantanen

Full code in Playground

Missing a trait bound for the trait that defines fn foo below:

fn do_stuff<T : Bar>(t : T) {  // Note the space before the colon in `T : Bar`
    t.foo()
}

Results in the following suggestion with an extra colon after the plus.

fn do_stuff<T: Foo +: Bar>(t : T) {

Metadata

Metadata

Assignees

Labels

A-suggestion-diagnosticsArea: Suggestions generated by the compiler applied by `cargo fix`C-bugCategory: This is a bug.D-invalid-suggestionDiagnostics: A structured suggestion resulting in incorrect code.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions