Skip to content

Testsuite compile-fail error checking requires you to be very explicit #20987

Closed
@mdinger

Description

@mdinger

#19870 (comment) multi-line errors are being implemented and once enabled, a compile fail mismatched types error, for example, requires all 5 lines of errors to be matched.

It would be nice if you could opt out of this partially at least so you only need to match one error. It may be particularly confusing in places like this (also below) which gives 2 errors on one line. This runs together to 10 lines of errors which must be annotated.

fn main() { let a: bool = 1is; let b: isize = true; }
//~^ ERROR mismatched types
//~| expected `bool`
//~| found `isize`
//~| expected bool
//~| found isize
//~| ERROR mismatched types
//~| expected `isize`
//~| found `bool`
//~| expected isize
//~| found bool

cc @nick29581

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions