Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mdinger opened this issue Jan 12, 2015 · 3 comments
Closed

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

mdinger opened this issue Jan 12, 2015 · 3 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@mdinger
Copy link
Contributor

mdinger commented Jan 12, 2015

#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

@kmcallister kmcallister added the A-testsuite Area: The testsuite used to check the correctness of rustc label Jan 12, 2015
@steveklabnik
Copy link
Member

Triage: no changes here that I'm aware of.

@steveklabnik steveklabnik added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jan 4, 2016
@Mark-Simulacrum
Copy link
Member

Still no changes I'm aware of, though UI tests in some cases are better for this. There has been some discussion about unifying compiler error testing, though I don't have a link. I'm not sure there's really a fix for this issue though, since checking all lines of the error is still necessary to make sure the error didn't change.

@steveklabnik
Copy link
Member

I'm not sure there's really a fix for this issue though,

Given there's been two years without comment, I'm guessing that this is good enough. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

4 participants