rust/tests/ui/static
Matthias Krüger 92aac1bdf6
Rollup merge of #146281 - Jules-Bertholet:static-align-thread-local, r=Mark-Simulacrum
Support `#[rustc_align_static]` inside `thread_local!`

Tracking issue: rust-lang/rust#146177

```rust
thread_local! {
    #[rustc_align_static(64)]
    static SO_ALIGNED: u64 = const { 0 };
}
```

This increases the amount of recursion the macro performs (once per attribute in addition to the previous once per item), making it easier to hit the recursion limit. I’ve added workarounds to limit the impact in the case of long doc comments, but this still needs a crater run just in case.

r? libs

``@rustbot`` label A-attributes A-macros A-thread-locals F-static_align T-libs
2025-10-02 10:27:48 +02: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
global-variable-promotion-error-7364.rs Add test batch 2 2025-08-27 15:06:05 -04:00
global-variable-promotion-error-7364.stderr Add test batch 2 2025-08-27 15:06:05 -04: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 Stabilize THIR unsafeck 2024-01-05 10:00:59 +00:00
static-align.rs Support #[rustc_align_static] inside thread_local! 2025-09-26 13:51:09 -04: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-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 Remove revisions for THIR unsafeck 2024-01-05 09:30:27 +00:00
static-mut-foreign-requires-unsafe.stderr Stabilize THIR unsafeck 2024-01-05 10:00:59 +00:00
static-mut-not-constant.rs Note def descr in NonConstFunctionCall 2024-12-23 22:15:32 +00:00
static-mut-not-constant.stderr Note def descr in NonConstFunctionCall 2024-12-23 22:15:32 +00:00
static-mut-not-pat.rs
static-mut-not-pat.stderr
static-mut-requires-unsafe.rs Remove revisions for THIR unsafeck 2024-01-05 09:30:27 +00:00
static-mut-requires-unsafe.stderr Stabilize THIR unsafeck 2024-01-05 10:00:59 +00:00
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 Note def descr in NonConstFunctionCall 2024-12-23 22:15:32 +00:00
static_sized_requirement.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
thread-local-in-ctfe.rs
thread-local-in-ctfe.stderr