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

Try harder to continue through errors in type checking #39275

Closed
nrc opened this issue Jan 24, 2017 · 2 comments
Closed

Try harder to continue through errors in type checking #39275

nrc opened this issue Jan 24, 2017 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-type-system Area: Type system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nrc
Copy link
Member

nrc commented Jan 24, 2017

If you look at librustc_typeck/lib.rs:check_crate, you see a bunch of tcx.sess.track_errors and early returns with ?. In most of these cases (perhaps all except type collection), we should be able to continue type checking instead of returning. That would mean getting more errors to the user sooner, and getting type info in more circumstances in IDEs.

@nrc nrc added A-diagnostics Area: Messages for errors, warnings, and lints A-type-system Area: Type system T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 24, 2017
@nrc nrc changed the title Try harder to continues through errors in type checking Try harder to continue through errors in type checking Jan 24, 2017
@nrc
Copy link
Member Author

nrc commented Jan 24, 2017

Sometimes, this leads to multiple errors where one would be enough, this ought to be able to be addressed by changing the type of an expression to TyErr, but I'm not sure if that kind of mutation is possible.

@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 26, 2017
bors added a commit that referenced this issue Mar 15, 2019
Remove `track_errors` from `check_match`, `typeck_item_bodies` and `register_plugins`

In the spirit of continuing through errors in type checking (#39275), remove `track_errors` from a couple of locations in the codebase.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Mar 23, 2019
Remove `track_errors` from `check_match`, `typeck_item_bodies` and `register_plugins`

In the spirit of continuing through errors in type checking (rust-lang#39275), remove `track_errors` from a couple of locations in the codebase.
bors added a commit that referenced this issue Mar 24, 2019
Remove `track_errors` from `check_match`, `typeck_item_bodies` and `register_plugins`

In the spirit of continuing through errors in type checking (#39275), remove `track_errors` from a couple of locations in the codebase.
@estebank
Copy link
Contributor

Quite a bit of work has been put into this and we'll continue to do so. I'll close this ticket but we can reopen more focused and actionable tickets in this front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-type-system Area: Type system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants