rust/compiler/rustc_hir_analysis/src
Michael Goulet 5019bb608a
Rollup merge of #125667 - oli-obk:taintify, r=TaKO8Ki
Silence follow-up errors directly based on error types and regions

During type_of, we used to just return an error type if there were any errors encountered. This is problematic, because it means a struct declared as `struct Foo<'static>` will end up not finding any inherent or trait impls because those impl blocks' `Self` type will be `{type error}` instead of `Foo<'re_error>`. Now it's the latter, silencing nonsensical follow-up errors about `Foo` not having any methods.

Unfortunately that now allows for new follow-up errors, because borrowck treats `'re_error` as `'static`, causing nonsensical errors about non-error lifetimes not outliving `'static`. So what I also did was to just strip all outlives bounds that borrowck found, thus never letting it check them. There are probably more nuanced ways to do this, but I worried there would be other nonsensical errors if some outlives bounds were missing. Also from the test changes, it looked like an improvement everywhere.
2024-06-04 08:52:12 -04:00
..
check Rollup merge of #125750 - compiler-errors:expect, r=lcnr 2024-06-04 08:25:48 +01:00
coherence Auto merge of #125380 - compiler-errors:wc-obj-safety, r=oli-obk 2024-06-04 02:34:20 +00:00
collect Rollup merge of #125667 - oli-obk:taintify, r=TaKO8Ki 2024-06-04 08:52:12 -04:00
errors Explicitly mention Self 2024-04-20 11:39:43 -04:00
hir_ty_lowering Rollup merge of #125608 - oli-obk:subsequent_lifetime_errors, r=BoxyUwU 2024-06-04 08:25:47 +01:00
impl_wf_check Opt-in diagnostics reporting to avoid doing extra work in the new solver 2024-06-03 09:27:52 -04:00
outlives Give EarlyBinder a tcx parameter 2024-05-26 20:04:05 -04:00
structured_errors Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
variance Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes 2024-05-19 11:10:56 -03:00
autoderef.rs Make builtin_deref just return a Ty 2024-05-09 22:55:00 -04:00
bounds.rs Rename ToPredicate for Upcast 2024-05-16 14:23:47 -04:00
check_unused.rs Remove LintDiagnostic::msg 2024-05-23 04:08:35 +02:00
collect.rs Add lang item for Future::Output 2024-05-29 14:22:56 -04:00
constrained_generic_params.rs Auto merge of #125076 - compiler-errors:alias-term, r=lcnr 2024-05-13 22:20:43 +00:00
errors.rs Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
hir_wf_check.rs Opt-in diagnostics reporting to avoid doing extra work in the new solver 2024-06-03 09:27:52 -04:00
impl_wf_check.rs Hide some follow-up errors 2024-06-03 13:03:53 +00:00
lib.rs Create const block DefIds in typeck instead of ast lowering 2024-05-28 13:38:43 +00:00
structured_errors.rs Rename StructuredDiagnostic as StructuredDiag. 2024-03-05 12:15:12 +11:00