rust/tests/ui/impl-trait
Matthias Krüger 559f8ce726
Rollup merge of #131795 - compiler-errors:expectation, r=Nadrieril
Stop inverting expectation in normalization errors

We have some funky special case logic to invert the expectation and actual type for normalization errors depending on their cause code. IMO most of the error messages get better, except for `try {}` blocks' type expectations. I think that these need to be special cased in some other way, rather than via this hack.

Fixes #131763
2024-10-19 22:00:57 +02:00
..
alias-liveness Bless test fallout 2024-08-17 12:43:25 -04:00
auxiliary
diagnostics
explicit-generic-args-with-impl-trait Revert suggestion verbosity change 2024-07-22 22:51:53 +00:00
in-ctfe
in-trait Rollup merge of #131795 - compiler-errors:expectation, r=Nadrieril 2024-10-19 22:00:57 +02:00
issues Stop inverting expectation in normalization errors 2024-10-16 13:44:56 -04:00
multiple-lifetimes Don't arbitrarily choose one upper bound for hidden captured region 2024-08-06 15:43:41 -04:00
precise-capturing Make sure that outer opaques capture inner opaques's lifetimes even with precise capturing syntax 2024-10-19 18:02:26 +00:00
rpit Do not try to reveal hidden types when trying to prove Freeze in the defining scope 2024-07-24 16:00:48 +00:00
transmute
arg-position-impl-trait-too-long.rs
arg-position-impl-trait-too-long.stderr
associated-impl-trait-type-generic-trait.rs
associated-impl-trait-type-issue-114325.rs
associated-impl-trait-type-trivial.rs
associated-impl-trait-type.rs
associated-type-cycle.rs
associated-type-cycle.stderr
associated-type-undefine.rs
associated-type-undefine.stderr
async_scope_creep.rs
auto-trait-coherence.next.stderr
auto-trait-coherence.old.stderr stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
auto-trait-coherence.rs stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
auto-trait-coherence.stderr stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
auto-trait-leak2.rs
auto-trait-leak2.stderr
auto-trait-leak-rpass.rs
auto-trait-leak.rs
auto-trait-leak.stderr
auto-trait-selection-freeze.next.stderr Do not assemble candidates for auto traits of opaque types in their defining scope 2024-07-24 16:00:48 +00:00
auto-trait-selection-freeze.old.stderr Do not assemble candidates for auto traits of opaque types in their defining scope 2024-07-24 16:00:48 +00:00
auto-trait-selection-freeze.rs Do not assemble candidates for auto traits of opaque types in their defining scope 2024-07-24 16:00:48 +00:00
auto-trait-selection.next.stderr Do not assemble candidates for auto traits of opaque types in their defining scope 2024-07-24 16:00:48 +00:00
auto-trait-selection.old.stderr Do not assemble candidates for auto traits of opaque types in their defining scope 2024-07-24 16:00:48 +00:00
auto-trait-selection.rs Do not assemble candidates for auto traits of opaque types in their defining scope 2024-07-24 16:00:48 +00:00
autoderef.rs
bivariant-lifetime-liveness.rs
bound-normalization-fail.rs
bound-normalization-fail.stderr Stop inverting expectation in normalization errors 2024-10-16 13:44:56 -04:00
bound-normalization-pass.rs
bounds_regression.rs
call_method_ambiguous.next.stderr Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
call_method_ambiguous.rs Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
call_method_on_inherent_impl_on_rigid_type.current.stderr
call_method_on_inherent_impl_on_rigid_type.next.stderr
call_method_on_inherent_impl_on_rigid_type.rs
call_method_on_inherent_impl_ref.current.stderr Do not try to reveal hidden types when trying to prove Freeze in the defining scope 2024-07-24 16:00:48 +00:00
call_method_on_inherent_impl_ref.next.stderr Do not try to reveal hidden types when trying to prove Freeze in the defining scope 2024-07-24 16:00:48 +00:00
call_method_on_inherent_impl_ref.rs Do not try to reveal hidden types when trying to prove Freeze in the defining scope 2024-07-24 16:00:48 +00:00
call_method_on_inherent_impl.next.stderr
call_method_on_inherent_impl.rs
call_method_without_import.no_import.stderr
call_method_without_import.rs
can-return-unconstrained-closure.rs
capture-lifetime-not-in-hir.rs Print the generic parameter along with the variance in dumps. 2024-08-23 23:00:45 +00:00
capture-lifetime-not-in-hir.stderr Print the generic parameter along with the variance in dumps. 2024-08-23 23:00:45 +00:00
closure-calling-parent-fn.rs
closure-in-impl-trait-arg.rs
closure-in-impl-trait.rs
coherence-treats-tait-ambig.current.stderr
coherence-treats-tait-ambig.rs stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
coherence-treats-tait-ambig.stderr stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
cross-return-site-inference.rs
cross-return-site-inference.stderr
deduce-signature-from-supertrait.rs
defined-by-trait-resolution.rs
defining-use-captured-non-universal-region.infer.stderr
defining-use-captured-non-universal-region.rs
defining-use-captured-non-universal-region.statik.stderr
defining-use-uncaptured-non-universal-region-2.rs
defining-use-uncaptured-non-universal-region-3.rs
defining-use-uncaptured-non-universal-region.rs
deprecated_annotation.rs
different_where_bounds.rs
divergence.rs
does-not-live-long-enough.rs
does-not-live-long-enough.stderr
dont-suggest-box-on-empty-else-arm.rs
dont-suggest-box-on-empty-else-arm.stderr
dyn-impl-type-mismatch.rs
dyn-impl-type-mismatch.stderr
dyn-incompatible-trait-in-return-position-dyn-trait.rs UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
dyn-incompatible-trait-in-return-position-dyn-trait.stderr UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
dyn-incompatible-trait-in-return-position-impl-trait.rs UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
dyn-incompatible-trait-in-return-position-impl-trait.stderr UI tests: Rename "object safe" to "dyn compatible" 2024-10-10 01:13:29 +02:00
dyn-trait-elided-two-inputs-assoc.rs
dyn-trait-elided-two-inputs-param.rs
dyn-trait-elided-two-inputs-ref-assoc.rs
dyn-trait-elided-two-inputs-ref-param.rs
dyn-trait-return-should-be-impl-trait.rs
dyn-trait-return-should-be-impl-trait.stderr
eagerly-reveal-in-local-body.rs
equal-hidden-lifetimes.rs
equality2.rs
equality2.stderr
equality-in-canonical-query.rs
equality-rpass.rs
equality-rpass.stderr
equality.rs
equality.stderr Don't call const normalize in error reporting 2024-09-22 13:55:06 -04:00
erased-regions-in-hidden-ty.current.stderr
erased-regions-in-hidden-ty.next.stderr
erased-regions-in-hidden-ty.rs
example-calendar.rs
example-st.rs
example-st.stderr
extra-impl-in-trait-impl.fixed Revert "Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix" 2024-08-03 07:57:31 -04:00
extra-impl-in-trait-impl.rs Revert "Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix" 2024-08-03 07:57:31 -04:00
extra-impl-in-trait-impl.stderr Revert "Rollup merge of #127107 - mu001999-contrib:dead/enhance-2, r=pnkfelix" 2024-08-03 07:57:31 -04:00
extra-item.rs
extra-item.stderr
failed-to-resolve-instance-ice-105488.rs
failed-to-resolve-instance-ice-105488.stderr
failed-to-resolve-instance-ice-123145.rs
failed-to-resolve-instance-ice-123145.stderr
fallback_inference.rs
fallback_inference.stderr
fallback.rs
feature-self-return-type.rs
feature-self-return-type.stderr
fresh-lifetime-from-bare-trait-obj-114664.rs
fresh-lifetime-from-bare-trait-obj-114664.stderr Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
future-no-bound-vars-ice-112347.rs
generic-with-implicit-hrtb-without-dyn.edition2015.stderr
generic-with-implicit-hrtb-without-dyn.edition2021.stderr Don't assume traits used as type are trait objs 2024-10-11 17:36:04 +02:00
generic-with-implicit-hrtb-without-dyn.rs Don't assume traits used as type are trait objs 2024-10-11 17:36:04 +02:00
hidden-lifetimes.rs
hidden-lifetimes.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
hidden-type-is-opaque-2.default.stderr
hidden-type-is-opaque-2.next.stderr
hidden-type-is-opaque-2.rs
hidden-type-is-opaque.rs
ice-unexpected-param-type-whensubstituting-in-region-112823.rs
ice-unexpected-param-type-whensubstituting-in-region-112823.stderr
impl_fn_associativity.rs
impl_trait_projections.rs
impl_trait_projections.stderr
impl-fn-hrtb-bounds-2.rs
impl-fn-hrtb-bounds-2.stderr
impl-fn-hrtb-bounds.rs elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
impl-fn-hrtb-bounds.stderr elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
impl-fn-parsing-ambiguities.rs
impl-fn-parsing-ambiguities.stderr
impl-fn-predefined-lifetimes.rs elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
impl-fn-predefined-lifetimes.stderr Bless ui tests. 2024-10-04 23:38:41 +00:00
impl-generic-mismatch-ab.rs
impl-generic-mismatch-ab.stderr
impl-generic-mismatch.rs
impl-generic-mismatch.stderr
impl-subtyper2.rs
impl-subtyper.rs
impl-trait-in-macro.rs
impl-trait-in-macro.stderr
impl-trait-plus-priority.rs
impl-trait-plus-priority.stderr
implicit-capture-late.rs
implicit-capture-late.stderr Print the generic parameter along with the variance in dumps. 2024-08-23 23:00:45 +00:00
in-assoc-type-unconstrained.rs
in-assoc-type-unconstrained.stderr
in-assoc-type.rs
in-assoc-type.stderr
issue-35668.rs
issue-35668.stderr
issue-36792.rs
issue-46959.rs
issue-49556.rs
issue-49579.rs
issue-49685.rs
issue-51185.rs
issue-54966.rs
issue-54966.stderr
issue-55872-1.rs
issue-55872-1.stderr
issue-55872-2.rs
issue-55872-2.stderr
issue-55872-3.rs
issue-55872-3.stderr
issue-55872.rs
issue-55872.stderr
issue-56445.rs
issue-68532.rs
issue-72911.rs
issue-72911.stderr
issue-87450.rs
issue-87450.stderr
issue-99073-2.rs
issue-99073-2.stderr
issue-99073.rs
issue-99073.stderr
issue-99642-2.rs
issue-99642.rs
issue-99914.rs
issue-99914.stderr
issue-100075-2.rs
issue-100075-2.stderr
issue-100075.rs
issue-100075.stderr
issue-100187.rs
issue-102605.rs
issue-102605.stderr
issue-103181-1.current.stderr
issue-103181-1.next.stderr
issue-103181-1.rs
issue-103181-2.rs
issue-103181-2.stderr
issue-103599.rs
issue-103599.stderr
issue-108591.rs
issue-108592.rs
lazy_subtyping_of_opaques.rs
lifetime-ambiguity-regression.rs
lifetimes2.rs
lifetimes.rs
mapping-duplicated-lifetimes-issue-114597.rs
method-resolution2.next.stderr
method-resolution2.rs
method-resolution3.current.stderr
method-resolution3.next.stderr
method-resolution3.rs
method-resolution4.next.stderr Register a dummy candidate for failed structural normalization during candiate assembly 2024-10-15 20:42:17 -04:00
method-resolution4.rs Register a dummy candidate for failed structural normalization during candiate assembly 2024-10-15 20:42:17 -04:00
method-resolution.rs
method-suggestion-no-duplication.rs
method-suggestion-no-duplication.stderr
multiple-defining-usages-in-body.rs
multiple-defining-usages-in-body.stderr
must_outlive_least_region_or_bound.rs
must_outlive_least_region_or_bound.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
needs_least_region_or_bound.rs
negative-reasoning.rs stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
negative-reasoning.stderr stabilize -Znext-solver=coherence 2024-10-15 13:11:00 +02:00
nested_impl_trait.rs
nested_impl_trait.stderr
nested-hkl-lifetime.rs
nested-return-type2-tait2.rs
nested-return-type2-tait2.stderr
nested-return-type2-tait3.rs
nested-return-type2-tait3.stderr
nested-return-type2-tait.rs
nested-return-type2-tait.stderr
nested-return-type2.rs
nested-return-type3-tait2.rs
nested-return-type3-tait2.stderr
nested-return-type3-tait3.rs
nested-return-type3-tait3.stderr
nested-return-type3-tait.rs
nested-return-type3-tait.stderr
nested-return-type3.rs
nested-return-type4.rs
nested-return-type4.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
nested-return-type.rs
nested-rpit-hrtb-2.rs
nested-rpit-hrtb-2.stderr
nested-rpit-hrtb.rs
nested-rpit-hrtb.stderr
nested-rpit-with-anonymous-lifetimes.rs
nesting.rs
no-method-suggested-traits.rs
no-method-suggested-traits.stderr
no-trait.rs
no-trait.stderr
normalize-opaque-with-bound-vars.rs
normalize-tait-in-const.rs also stabilize const_refs_to_cell 2024-09-15 10:20:47 +02:00
normalize-tait-in-const.stderr also stabilize const_refs_to_cell 2024-09-15 10:20:47 +02:00
not_general_enough_regression_106630.rs
opaque-cast-field-access-in-future.rs
opaque-cast-field-access-in-future.stderr
opaque-hidden-inferred-rpitit.rs Don't ICE in opaque_hidden_inferred_bound lint for RPITIT in trait with no default method body 2024-09-16 12:35:54 -04:00
opaque-used-in-extraneous-argument.rs
opaque-used-in-extraneous-argument.stderr
point-to-type-err-cause-on-impl-trait-return.rs
point-to-type-err-cause-on-impl-trait-return.stderr
printing-binder.rs
printing-binder.stderr
private_unused.rs
projection-mismatch-in-impl-where-clause.rs
projection-mismatch-in-impl-where-clause.stderr Stop inverting expectation in normalization errors 2024-10-16 13:44:56 -04:00
projection.rs
question_mark.rs
recursive-auto-trait.rs
recursive-bound-eval.next.stderr
recursive-bound-eval.rs
recursive-coroutine-boxed.next.stderr Register a dummy candidate for failed structural normalization during candiate assembly 2024-10-15 20:42:17 -04:00
recursive-coroutine-boxed.rs Register a dummy candidate for failed structural normalization during candiate assembly 2024-10-15 20:42:17 -04:00
recursive-coroutine-indirect.current.stderr
recursive-coroutine-indirect.next.stderr
recursive-coroutine-indirect.rs
recursive-ice-101862.rs
recursive-ice-101862.stderr Use the right type when coercing fn items to pointers 2024-08-13 16:23:20 -04:00
recursive-impl-trait-type-direct.rs
recursive-impl-trait-type-indirect.rs
recursive-impl-trait-type-indirect.stderr
recursive-impl-trait-type-through-non-recursive.rs
recursive-impl-trait-type-through-non-recursive.stderr
recursive-parent-trait-method-call.rs
recursive-type-alias-impl-trait-declaration-too-subtle-2.rs
recursive-type-alias-impl-trait-declaration-too-subtle.rs
recursive-type-alias-impl-trait-declaration-too-subtle.stderr Bless ui tests. 2024-10-04 23:38:41 +00:00
recursive-type-alias-impl-trait-declaration.rs
recursive-type-alias-impl-trait-declaration.stderr
region-escape-via-bound-contravariant-closure.rs
region-escape-via-bound-contravariant.rs
region-escape-via-bound.rs
region-escape-via-bound.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
return-position-impl-trait-minimal.rs
reveal-during-codegen.rs
rpit-assoc-pair-with-lifetime.rs elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
rpit-assoc-pair-with-lifetime.stderr elided_named_lifetimes: bless & add tests 2024-08-31 15:35:42 +03:00
rpit-not-sized.rs
rpit-not-sized.stderr
stashed-diag-issue-121504.rs
stashed-diag-issue-121504.stderr
static-lifetime-return-position-impl-trait.rs
static-return-lifetime-infered.rs
static-return-lifetime-infered.stderr Bless test fallout 2024-08-17 12:43:25 -04:00
stranded-opaque.rs
stranded-opaque.stderr
suggest-calling-rpit-closure.rs
suggest-calling-rpit-closure.stderr
trait_resolution.rs
trait_type.rs
trait_type.stderr
trait_upcasting_reference_mismatch.rs
trait_upcasting_reference_mismatch.stderr
trait_upcasting.rs
two_tait_defining_each_other2.current.stderr
two_tait_defining_each_other2.next.stderr
two_tait_defining_each_other2.rs
two_tait_defining_each_other3.current.stderr
two_tait_defining_each_other3.rs
two_tait_defining_each_other.current.stderr
two_tait_defining_each_other.rs
type_parameters_captured.rs
type_parameters_captured.stderr
type-alias-generic-param.rs
type-alias-generic-param.stderr
type-alias-impl-trait-in-fn-body.rs
type-alias-impl-trait-in-fn-body.stderr
type-arg-mismatch-due-to-impl-trait.rs
type-arg-mismatch-due-to-impl-trait.stderr
unactionable_diagnostic.fixed
unactionable_diagnostic.rs
unactionable_diagnostic.stderr
universal_hrtb_anon.rs
universal_hrtb_named.rs
universal_in_adt_in_parameters.rs
universal_in_impl_trait_in_parameters.rs
universal_in_trait_defn_parameters.rs
universal_multiple_bounds.rs
universal_wrong_bounds.rs
universal_wrong_bounds.stderr
universal_wrong_hrtb.rs
universal_wrong_hrtb.stderr
universal-mismatched-type.rs
universal-mismatched-type.stderr
universal-two-impl-traits.rs
universal-two-impl-traits.stderr
unsafety-checking-cycle.rs
unsize_adt.rs
unsize_slice.rs
unsize_tuple.rs
unsize-cast-validation-rpit.rs Don't check unsize goal in MIR validation when opaques remain 2024-10-15 21:01:42 -04:00
unsized_coercion2.old.stderr
unsized_coercion2.rs
unsized_coercion3.next.stderr Be better at reporting alias errors 2024-10-15 20:42:17 -04:00
unsized_coercion3.old.stderr Be better at reporting alias errors 2024-10-15 20:42:17 -04:00
unsized_coercion3.rs Be better at reporting alias errors 2024-10-15 20:42:17 -04:00
unsized_coercion4.rs
unsized_coercion5.old.stderr Allow dropping dyn principal 2024-10-17 20:43:31 +02:00
unsized_coercion5.rs Allow dropping dyn principal 2024-10-17 20:43:31 +02:00
unsized_coercion.next.stderr Be better at reporting alias errors 2024-10-15 20:42:17 -04:00
unsized_coercion.rs Be better at reporting alias errors 2024-10-15 20:42:17 -04:00
upvar_captures.rs
upvar_captures.stderr
variance.e2024.stderr Print the generic parameter along with the variance in dumps. 2024-08-23 23:00:45 +00:00
variance.new.stderr Print the generic parameter along with the variance in dumps. 2024-08-23 23:00:45 +00:00
variance.old.stderr Print the generic parameter along with the variance in dumps. 2024-08-23 23:00:45 +00:00
variance.rs Print the generic parameter along with the variance in dumps. 2024-08-23 23:00:45 +00:00
wf-check-hidden-type.rs
wf-check-hidden-type.stderr
wf-eval-order.rs
where-allowed-2.rs
where-allowed-2.stderr
where-allowed.rs Separate collection of crate-local inherent impls from error reporting 2024-09-24 10:12:05 -04:00
where-allowed.stderr Bless ui tests. 2024-10-04 23:38:41 +00:00
xcrate_simple.rs
xcrate.rs