]> git.lizzy.rs Git - rust.git/commit
Properly track `ImplObligation`s
authorEsteban Kuber <esteban@kuber.com.ar>
Wed, 13 Oct 2021 13:58:41 +0000 (13:58 +0000)
committerEsteban Kuber <esteban@kuber.com.ar>
Thu, 24 Mar 2022 02:08:49 +0000 (02:08 +0000)
commit5fd37862d95a7fd898342e49ae5273edc8886b83
treefe52310640ff222ce511fc596d06c447b68863ef
parent547369d3d881a9eb1de0d3e368f9a59aa7c648b0
Properly track `ImplObligation`s

Instead of probing for all possible impls that could have caused an
`ImplObligation`, keep track of its `DefId` and obligation spans for
accurate error reporting.

Follow up to #89580. Addresses #89418.

Remove some unnecessary clones.

Tweak output for auto trait impl obligations.
24 files changed:
compiler/rustc_infer/src/infer/error_reporting/nice_region_error/mismatched_static_lifetime.rs
compiler/rustc_middle/src/traits/mod.rs
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
compiler/rustc_trait_selection/src/traits/select/confirmation.rs
compiler/rustc_trait_selection/src/traits/select/mod.rs
compiler/rustc_typeck/src/check/compare_method.rs
compiler/rustc_typeck/src/check/fn_ctxt/checks.rs
compiler/rustc_typeck/src/check/method/probe.rs
compiler/rustc_typeck/src/check/method/suggest.rs
compiler/rustc_typeck/src/lib.rs
src/test/ui/derives/derive-assoc-type-not-impl.stderr
src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.rs
src/test/ui/generic-associated-types/method-unsatified-assoc-type-predicate.stderr
src/test/ui/hrtb/issue-30786.migrate.stderr
src/test/ui/hrtb/issue-30786.nll.stderr
src/test/ui/missing-trait-bounds/missing-trait-bounds-for-method-call.stderr
src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.precise.stderr
src/test/ui/rfc-2632-const-trait-impl/const-drop-fail.stock.stderr
src/test/ui/specialization/defaultimpl/specialization-trait-not-implemented.stderr
src/test/ui/traits/alias/cross-crate.stderr
src/test/ui/traits/inductive-overflow/supertrait-auto-trait.stderr
src/test/ui/union/union-derive-clone.mirunsafeck.stderr
src/test/ui/union/union-derive-clone.thirunsafeck.stderr
src/test/ui/wf/hir-wf-check-erase-regions.stderr