rust/tests/ui/static
kulst 630c7596e9 Ensure that static initializers are acyclic for NVPTX
NVPTX does not support cycles in static initializers. LLVM produces an error when attempting to codegen such constructs (like self referential structs).

To not produce LLVM UB we instead emit a post-monomorphization error on
Rust side before reaching codegen.

This is achieved by analysing a subgraph of the "mono item graph" that
only contains statics:
1. Calculate the strongly connected components (SCCs) of the graph
2. Check for cycles (more than one node in a SCC or exactly one node
   which references itself)
2026-01-06 17:00:21 +01:00
..
auxiliary Use non-2015 edition paths in tests that do not test for their resolution 2025-06-05 09:19:31 +02:00
bad-const-type.rs UI tests: add missing diagnostic kinds where possible 2025-04-08 23:06:31 +03:00
bad-const-type.stderr Make Diag::multipart_suggestions always verbose 2025-07-10 17:23:29 +00:00
duplicated-fields-issue-124464.rs check_expr_struct_fields: taint context with errors if struct definition is malformed 2024-06-05 21:54:22 +02:00
duplicated-fields-issue-124464.stderr check_expr_struct_fields: taint context with errors if struct definition is malformed 2024-06-05 21:54:22 +02:00
duplicated-fields-issue-125842.rs check_expr_struct_fields: taint context with errors if struct definition is malformed 2024-06-05 21:54:22 +02:00
duplicated-fields-issue-125842.stderr check_expr_struct_fields: taint context with errors if struct definition is malformed 2024-06-05 21:54:22 +02:00
extern-static-normalization-failure-issue-148161.rs fix: Do not ICE on normalization failure of an extern static item 2025-11-24 23:50:49 +09:00
extern-static-normalization-failure-issue-148161.stderr fix: Do not ICE on normalization failure of an extern static item 2025-11-24 23:50:49 +09:00
global-variable-promotion-error-7364.rs Add test batch 2 2025-08-27 15:06:05 -04:00
global-variable-promotion-error-7364.stderr review comments 2025-11-02 20:12:26 +00:00
issue-1660.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
issue-5216.rs
issue-5216.stderr
issue-18118.rs
issue-18118.stderr
issue-24446.rs Do not check Sync during type_of. 2025-07-26 21:53:13 +00:00
issue-24446.stderr Do not check Sync during type_of. 2025-07-26 21:53:13 +00:00
issue-24843.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-34194.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing-type.rs propagate tainted_by_errors in MirBorrowckCtxt::emit_errors 2024-09-04 20:06:33 +02:00
missing-type.stderr propagate tainted_by_errors in MirBorrowckCtxt::emit_errors 2024-09-04 20:06:33 +02:00
nested_item_main.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
raw-ref-deref-with-unsafe.rs Don't emit null pointer lint for raw ref of null deref 2024-10-06 22:36:51 -04:00
raw-ref-deref-without-unsafe.rs Don't emit null pointer lint for raw ref of null deref 2024-10-06 22:36:51 -04:00
raw-ref-deref-without-unsafe.stderr Don't emit null pointer lint for raw ref of null deref 2024-10-06 22:36:51 -04:00
raw-ref-extern-static.rs stabilize raw_ref_op 2024-08-18 19:46:53 +02:00
raw-ref-static-mut.rs stabilize raw_ref_op 2024-08-18 19:46:53 +02:00
refer-to-other-statics-by-value.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
safe-extern-statics-mut.rs Update tests for hidden references to mutable static 2024-09-13 14:10:56 +03:00
safe-extern-statics-mut.stderr Update tests for hidden references to mutable static 2024-09-13 14:10:56 +03:00
safe-extern-statics.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
safe-extern-statics.stderr
static-align.rs Remove uses of cfg(any()/all()) 2025-12-10 23:41:19 +00:00
static-array-shared-slice-references.rs cleaned up some tests 2025-12-13 00:54:20 +09:00
static-closures.rs Gate static coroutines behind a parser feature 2025-08-19 13:12:31 +00:00
static-closures.stderr Gate static coroutines behind a parser feature 2025-08-19 13:12:31 +00:00
static-drop-scope.rs Update tests. 2025-06-13 09:20:48 +02:00
static-drop-scope.stderr Update tests. 2025-06-13 09:20:48 +02:00
static-extern-type.rs Use non-2015 edition paths in tests that do not test for their resolution 2025-06-05 09:19:31 +02:00
static-initializer-acyclic-issue-146787.rs Ensure that static initializers are acyclic for NVPTX 2026-01-06 17:00:21 +01:00
static-initializer-acyclic-issue-146787.stderr Ensure that static initializers are acyclic for NVPTX 2026-01-06 17:00:21 +01:00
static-items-cant-move.rs
static-items-cant-move.stderr Mention type that could be Clone but isn't in more cases 2025-07-25 18:34:10 +00:00
static-lifetime-bound.rs
static-lifetime-bound.stderr reword note 2025-09-28 20:55:35 +00:00
static-lifetime.rs Enforce supertrait outlives obligations hold when confirming impl 2024-08-05 09:55:14 -04:00
static-lifetime.stderr fix: Alloc new errorcode E0803 for E0495 2025-02-15 12:18:30 +08:00
static-list-initialization-5917.rs Add test batch 1 2025-08-27 00:23:26 -04:00
static-method-privacy.rs
static-method-privacy.stderr
static-mut-bad-types.rs
static-mut-bad-types.stderr
static-mut-foreign-requires-unsafe.rs
static-mut-foreign-requires-unsafe.stderr
static-mut-not-constant.rs Note def descr in NonConstFunctionCall 2024-12-23 22:15:32 +00:00
static-mut-not-constant.stderr review comments 2025-11-02 20:12:26 +00:00
static-mut-not-pat.rs
static-mut-not-pat.stderr
static-mut-requires-unsafe.rs
static-mut-requires-unsafe.stderr
static-priv-by-default2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
static-priv-by-default2.stderr
static-reference-to-fn-1.rs
static-reference-to-fn-1.stderr Show diff suggestion format on verbose replacement 2025-02-10 20:21:39 +00:00
static-reference-to-fn-2.rs
static-reference-to-fn-2.stderr
static-region-bound.rs
static-region-bound.stderr reword note 2025-09-28 20:55:35 +00:00
static-string-slice-9249.rs Rehome tests/ui/issues/ tests [4/?] 2025-08-10 11:54:15 -04:00
static-struct-initialization-5688.rs Add test batch 1 2025-08-27 00:23:26 -04:00
static-struct-with-option-8578.rs Rehome tests/ui/issues/ tests [5/?] 2025-08-17 13:01:02 -04:00
static-vec-repeat-not-constant.rs
static-vec-repeat-not-constant.stderr review comments 2025-11-02 20:12:26 +00:00
static_sized_requirement.rs compiletest: rename add-core-stubs to add-minicore 2025-11-02 16:20:06 +01:00
thread-local-in-ctfe.rs
thread-local-in-ctfe.stderr