Skip to content

Incorrect spans for tuple struct fields #50578

Closed
@estebank

Description

@estebank

As identified in a recent PR, tuple struct fields have spans including trailing characters (, and )):

error[E0204]: the trait `Copy` may not be implemented for this type
 --> src/main.rs:1:17
  |
1 | #[derive(Clone, Copy)]
  |                 ^^^^
2 | struct Foo(NotDefined, <i32 as Iterator>::Item, Vec<i32>, String);
  |            ----------- this field does not implement `Copy`

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions