about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-06-04 08:52:12 -0400
committerGitHub <noreply@github.com>2024-06-04 08:52:12 -0400
commit5019bb608a465da3620956629a55d8007e78e98d (patch)
treec78f3cad81a625cc1652f5954c605fb4ce84cf7d /compiler/rustc_resolve/src
parent85f90a461262f7ca37a6e629933d455fa9c3ee48 (diff)
parent39b39da40beed5e4e555a1465dd0413b04afe91e (diff)
downloadrust-5019bb608a465da3620956629a55d8007e78e98d.tar.gz
rust-5019bb608a465da3620956629a55d8007e78e98d.zip
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.
Diffstat (limited to 'compiler/rustc_resolve/src')
0 files changed, 0 insertions, 0 deletions