-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
replace track_errors
usages with bubbling up ErrorGuaranteed
#119869
Conversation
r? @BoxyUwU (rustbot has picked a reviewer for you, use r? to override) |
return; | ||
// This is super fishy, but our current `rustc_hir_analysis::check_crate` pipeline depends on | ||
// `type_of` having been called much earlier, and thus this value being read from cache. | ||
// Compilation must continue in order for other important diagnostics to keep showing up. | ||
return Ok(()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new errors in the tests happen because of this hack.
- If we
track_errors
thetype_of
call above, we'd get zero diagnostics changes. - If we use
error_reported()?
on the type returned fromtype_of
, we lose lots of useful diagnostics - If we ignore the
Result
returned fromcheck_mod_impl_wf
, we get lots of new diagnostics, sometimes not very useful.
We can change this easily in the future, but I'd rather write separate PRs to compare, and not do it in this PR.
41ea446
to
4d66bb7
Compare
// FIXME(matthewjasper) We shouldn't need to use `track_errors` anywhere in this function | ||
// or the compiler in general. | ||
res.and(tcx.sess.track_errors(|| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This last one is hard. I started a zulip thread about it: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/ty.3A.3AError.20and.20wrong.20.60ErrorGuaranteed.60
This comment has been minimized.
This comment has been minimized.
4d66bb7
to
767d253
Compare
Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
This comment has been minimized.
This comment has been minimized.
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
…rors up instead.
e6dc52f
to
18e6643
Compare
@bors r+ |
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#119582 (bootstrap: handle vendored sources when remapping crate paths) - rust-lang#119730 (docs: fix typos) - rust-lang#119828 (Improved collapse_debuginfo attribute, added command-line flag) - rust-lang#119869 (replace `track_errors` usages with bubbling up `ErrorGuaranteed`) - rust-lang#120037 (Remove `next_root_ty_var`) - rust-lang#120094 (tests/ui/asm/inline-syntax: adapt for LLVM 18) - rust-lang#120096 (Set RUSTC_BOOTSTRAP=1 consistently) - rust-lang#120101 (change `.unwrap()` to `?` on write where `fmt::Result` is returned) - rust-lang#120102 (Fix typo in munmap_partial.rs) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#119582 (bootstrap: handle vendored sources when remapping crate paths) - rust-lang#119730 (docs: fix typos) - rust-lang#119828 (Improved collapse_debuginfo attribute, added command-line flag) - rust-lang#119869 (replace `track_errors` usages with bubbling up `ErrorGuaranteed`) - rust-lang#120037 (Remove `next_root_ty_var`) - rust-lang#120094 (tests/ui/asm/inline-syntax: adapt for LLVM 18) - rust-lang#120096 (Set RUSTC_BOOTSTRAP=1 consistently) - rust-lang#120101 (change `.unwrap()` to `?` on write where `fmt::Result` is returned) - rust-lang#120102 (Fix typo in munmap_partial.rs) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#119869 - oli-obk:track_errors2, r=matthewjasper replace `track_errors` usages with bubbling up `ErrorGuaranteed` more of the same as rust-lang#117449 (removing `track_errors`)
…asper Remove `track_errors` entirely follow up to rust-lang#119869 r? `@matthewjasper` There are some diagnostic changes adding new diagnostics or not emitting some anymore. We can improve upon that in follow-up work imo.
Rollup merge of rust-lang#119895 - oli-obk:track_errors_3, r=matthewjasper Remove `track_errors` entirely follow up to rust-lang#119869 r? `@matthewjasper` There are some diagnostic changes adding new diagnostics or not emitting some anymore. We can improve upon that in follow-up work imo.
…sper replace `track_errors` usages with bubbling up `ErrorGuaranteed` more of the same as rust-lang#117449 (removing `track_errors`)
Related PRs so far: - rust-lang/rust#119869 - rust-lang/rust#120080 - rust-lang/rust#120128 - rust-lang/rust#119369 - rust-lang/rust#116672 By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses. --------- Signed-off-by: Felipe R. Monteiro <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: tautschnig <[email protected]> Co-authored-by: Qinheping Hu <[email protected]> Co-authored-by: Michael Tautschnig <[email protected]> Co-authored-by: Felipe R. Monteiro <[email protected]>
more of the same as #117449 (removing
track_errors
)