rust/tests/ui/fn
bors 4e97337005 Auto merge of #142030 - oli-obk:wfck-less-hir, r=compiler-errors
Start moving wf checking away from HIR

I'm trying to only access the HIR in the error path. My hope is that once we move significant portions of wfcheck off HIR that incremental will be able to cache wfcheck queries significantly better.

I think I am reaching a blocker because we normally need to provide good spans to `ObligationCause`, so that the trait solver can report good errors. In some cases I have been able to use bad spans and improve them depending on the `ObligationCauseCode` (by loading HIR in the case where we actually want to error). To scale that further we'll likely need to remove spans from the `ObligationCause` entirely (leaving it to some variants of `ObligationCauseCode` to have a span when they can't recompute the information later). Unsure this is the right approach, but we've already been using it. I will create an MCP about it, but that should not affect this PR, which is fairly limited in where it does those kind of tricks.

Especially b862d8828e is interesting here, because I think it improves spans in all cases
2025-07-01 14:59:58 +00:00
..
bad-main.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
bad-main.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
bad-turbofish-hints-issue-121901.rs Fix two incorrect turbofish suggestions 2025-04-02 18:10:34 +02:00
bad-turbofish-hints-issue-121901.stderr Fix two incorrect turbofish suggestions 2025-04-02 18:10:34 +02:00
coerce-suggestion-infer-region.rs Fixed possible ICE in annotate_mut_binding_to_immutable_binding 2025-05-19 10:16:29 -07:00
coerce-suggestion-infer-region.stderr Fixed possible ICE in annotate_mut_binding_to_immutable_binding 2025-05-19 10:16:29 -07:00
dyn-fn-alignment.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
error-recovery-mismatch.rs Fix ICE when function argument mismatches. 2025-02-03 20:55:22 -05:00
error-recovery-mismatch.stderr Replace ItemCtxt::report_placeholder_type_error match with a call to TyCtxt::def_descr 2025-06-30 20:36:16 +02:00
expr-fn-panic.rs tests: use needs-subprocess instead of ignore-{wasm32,emscripten,sgx} 2025-01-23 20:51:29 +08:00
expr-fn.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-bad-block-type.rs compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
fn-bad-block-type.stderr compiletest: Require //~ annotations even if error-pattern is specified 2025-04-03 11:08:55 +03:00
fn-closure-mutable-capture.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fn-closure-mutable-capture.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
fn-compare-mismatch.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fn-compare-mismatch.stderr improve fn pointer notes 2023-01-26 05:07:34 +00:00
fn-item-type.rs compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
fn-item-type.stderr compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
fn-pointer-mismatch.rs compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
fn-pointer-mismatch.stderr compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
fn-ptr-trait-int-float-infer-var.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-ptr-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-recover-return-sign.fixed Make parse error suggestions verbose and fix spans 2024-07-12 03:02:57 +00:00
fn-recover-return-sign.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
fn-recover-return-sign.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
fn-recover-return-sign2.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
fn-recover-return-sign2.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
fn-trait-formatting.rs compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
fn-trait-formatting.stderr compiletest: Make diagnostic kind mandatory on line annotations 2025-04-30 10:44:24 +03:00
fn-trait-use-named-params-issue-140169.rs Use parse_param_general when parsing (T, U)->R in parse_path_segment 2025-05-07 22:56:14 +08:00
fn-trait-use-named-params-issue-140169.stderr Use parse_param_general when parsing (T, U)->R in parse_path_segment 2025-05-07 22:56:14 +08:00
fn_def_coercion.rs only avoid blaming assignments from argument patterns 2025-01-06 16:12:11 -08:00
fn_def_coercion.stderr only avoid blaming assignments from argument patterns 2025-01-06 16:12:11 -08:00
fn_def_opaque_coercion.rs Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
fn_def_opaque_coercion_to_fn_ptr.rs Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
fn_def_opaque_coercion_to_fn_ptr.stderr Implement #[define_opaque] attribute for functions. 2025-03-11 12:05:02 +00:00
fun-call-variants.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
implied-bounds-impl-header-projections.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
implied-bounds-unnorm-associated-type-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
implied-bounds-unnorm-associated-type-2.stderr make outlives constraints from generic arguments less boring 2025-01-06 16:12:11 -08:00
implied-bounds-unnorm-associated-type-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
implied-bounds-unnorm-associated-type-4.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
implied-bounds-unnorm-associated-type-4.stderr Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck 2024-07-26 14:41:56 -04:00
implied-bounds-unnorm-associated-type-5.rs Enforce supertrait outlives obligations hold when confirming impl 2024-08-05 09:55:14 -04:00
implied-bounds-unnorm-associated-type-5.stderr Enforce supertrait outlives obligations hold when confirming impl 2024-08-05 09:55:14 -04:00
implied-bounds-unnorm-associated-type.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
implied-bounds-unnorm-associated-type.stderr Peel off explicit (or implicit) deref before suggesting clone on move error in borrowck 2024-07-26 14:41:56 -04:00
issue-1451.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
issue-1900.rs Move some tests 2024-03-31 14:58:17 -03:00
issue-1900.stderr Move some tests 2024-03-31 14:58:17 -03:00
issue-3044.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-3044.stderr Trim suggestion part before generating highlights 2025-02-21 00:54:01 +00:00
issue-3099.rs Move tests 2023-05-08 17:58:01 -03:00
issue-3099.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-3904.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-39259.rs Rename HIR TypeBinding to AssocItemConstraint and related cleanup 2024-05-30 22:52:33 +02:00
issue-39259.stderr Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00
issue-80179.rs Move /src/test to /tests 2023-01-11 09:32:08 +00:00
issue-80179.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
keyword-order.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
keyword-order.stderr Add explanatory note to 'expected item' error 2023-09-06 09:05:07 +05:30
mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.fixed Account for mutable borrow in argument suggestion 2025-01-24 23:34:34 +00:00
mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs Account for mutable borrow in argument suggestion 2025-01-24 23:34:34 +00:00
mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.stderr Account for mutable borrow in argument suggestion 2025-01-24 23:34:34 +00:00
nested-function-names-issue-8587.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
param-mismatch-foreign.rs compiletest: Do not require annotations on empty labels and suggestions 2025-05-03 22:49:23 +03:00
param-mismatch-foreign.stderr compiletest: Do not require annotations on empty labels and suggestions 2025-05-03 22:49:23 +03:00
param-mismatch-no-names.rs Tweak parameter mismatch explanation to not say unknown 2024-11-25 03:04:07 +00:00
param-mismatch-no-names.stderr Tweak parameter mismatch explanation to not say unknown 2024-11-25 03:04:07 +00:00
param-mismatch-trait-fn.rs Check for generic parameter mismatches on trait functions. 2025-02-03 12:54:53 -05:00
param-mismatch-trait-fn.stderr Check for generic parameter mismatches on trait functions. 2025-02-03 12:54:53 -05:00
signature-error-reporting-under-verbose.rs compiletest: Do not require annotations on empty labels and suggestions 2025-05-03 22:49:23 +03:00
signature-error-reporting-under-verbose.stderr compiletest: Do not require annotations on empty labels and suggestions 2025-05-03 22:49:23 +03:00
suggest-return-closure.rs compiletest: Make SUGGESTION annotations viral 2025-04-10 23:48:57 +03:00
suggest-return-closure.stderr compiletest: Make SUGGESTION annotations viral 2025-04-10 23:48:57 +03:00
suggest-return-future.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
suggest-return-future.stderr Move /src/test to /tests 2023-01-11 09:32:08 +00:00
trait-fn-generic-mismatch.rs Add test to ensure no index out of bounds panic (#135474) 2025-03-22 02:08:44 +09:00
trait-fn-generic-mismatch.stderr Add test to ensure no index out of bounds panic (#135474) 2025-03-22 02:08:44 +09:00