rust/tests/ui/statics
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
..
auxiliary Use non-2015 edition paths in tests that do not test for their resolution 2025-06-05 09:19:31 +02:00
check-immutable-mut-slices.rs const checks: avoid 'top-level scope' terminology 2025-06-27 17:03:48 +02:00
check-immutable-mut-slices.stderr const checks: avoid 'top-level scope' terminology 2025-06-27 17:03:48 +02:00
check-recursion-foreign.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
check-values-constraints.rs Note def descr in NonConstFunctionCall 2024-12-23 22:15:32 +00:00
check-values-constraints.stderr Note def descr in NonConstFunctionCall 2024-12-23 22:15:32 +00:00
const_generics.rs Stabilize const_refs_to_static 2024-09-26 13:21:15 +02:00
inner-static.rs Move some tests out of tests/ui 2025-05-03 17:22:52 +02:00
issue-14227.rs Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
issue-14227.stderr const-eval error: always say in which item the error occurred 2025-06-07 13:42:30 +02:00
issue-15261.rs Fix error message for static references or mutable references 2025-04-26 14:48:30 +09:00
issue-15261.stderr Fix error message for static references or mutable references 2025-04-26 14:48:30 +09:00
issue-17233.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-17718-static-sync.rs
issue-17718-static-sync.stderr Don't look at static items' HIR for wfcheck 2025-06-30 08:45:43 +00:00
issue-17718-static-unsafe-interior.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
issue-44373-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-44373.rs
issue-44373.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
issue-91050-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-91050-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing_lifetime.rs Avoid follow-up errors and ICEs after missing lifetime errors on data structures 2024-07-11 11:00:15 +00:00
missing_lifetime.stderr Make missing lifetime suggestion verbose 2025-06-24 18:59:42 +00:00
mutable_memory_validation.rs Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
mutable_memory_validation.stderr Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
nested-allocations-dont-inherit-codegen-attrs.rs Don't inherit codegen attrs from parent static 2024-03-31 22:34:00 -04:00
nested_struct.rs [Refactor] Rename Lint and LintGroup\'s is_loaded to is_externally_loaded 2024-04-29 15:57:09 +02:00
nested_thread_local.rs also stabilize const_refs_to_cell 2024-09-15 10:20:47 +02:00
nested_thread_local.stderr also stabilize const_refs_to_cell 2024-09-15 10:20:47 +02:00
read_before_init.rs const-eval: error when initializing a static writes to that static 2025-06-27 14:39:35 +02:00
read_before_init.stderr const-eval: error when initializing a static writes to that static 2025-06-27 14:39:35 +02:00
recursive_interior_mut.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
static-fn-inline-xc.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
static-fn-trait-xc.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
static-function-pointer-xc.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
static-function-pointer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
static-generic-param-soundness.rs cleaned up some tests 2025-06-29 15:37:33 +05:00
static-generic-param-soundness.stderr cleaned up some tests 2025-06-29 15:37:33 +05:00
static-impl.rs Use non-2015 edition paths in tests that do not test for their resolution 2025-06-05 09:19:31 +02:00
static-impl.stderr Update tests 2024-02-07 10:42:01 +08:00
static-method-in-trait-with-tps-intracrate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
static-method-xcrate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
static-methods-in-traits.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
static-methods-in-traits2.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
static-mut-shared-parens.rs Fix error message for static references or mutable references 2025-04-26 14:48:30 +09:00
static-mut-shared-parens.stderr Fix error message for static references or mutable references 2025-04-26 14:48:30 +09:00
static-mut-xc.rs Fix error message for static references or mutable references 2025-04-26 14:48:30 +09:00
static-mut-xc.stderr Fix error message for static references or mutable references 2025-04-26 14:48:30 +09:00
static-promotion.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
static-recursive.rs Fix error message for static references or mutable references 2025-04-26 14:48:30 +09:00
static-recursive.stderr Fix error message for static references or mutable references 2025-04-26 14:48:30 +09:00
uninhabited-static.rs Use the informative error as the main const eval error message 2025-06-02 15:37:15 +00:00
uninhabited-static.stderr Unconditionally run check_item_type on all items 2025-06-30 08:06:08 +00:00
unsized_type2.rs Taint const qualifs if a static is referenced that didn't pass wfcheck 2024-04-16 10:43:41 +00:00
unsized_type2.stderr Don't look at static items' HIR for wfcheck 2025-06-30 08:45:43 +00:00
unsizing-wfcheck-issue-127299.rs Deduplicate dyn compatibility violations due to coercion 2025-05-26 10:57:54 +00:00
unsizing-wfcheck-issue-127299.stderr Don't look at static items' HIR for wfcheck 2025-06-30 08:45:43 +00:00