rust/tests/ui/repr
Matthias Krüger 4b7e55ada3
Rollup merge of #133925 - folkertdev:improve-repr-warnings, r=compiler-errors
disallow `repr()` on invalid items

fixes https://github.com/rust-lang/rust/issues/129606
fixes https://github.com/rust-lang/rust/issues/132391

Disallows `repr()` (so a repr with no arguments) on items where that won't ever make sense.

Also this generates an error when `repr` is used on a trait method and the `fn_align` feature is not enabled. Looks like that was missed here:

https://github.com/rust-lang/rust/pull/110313/files

Which first accepts the align attribute on trait methods.

r? `@compiler-errors`

cc `@jdonszelmann` who claimed https://github.com/rust-lang/rust/issues/132391 and generally has been working on attributes
2025-02-06 21:56:24 +01:00
..
auxiliary
16-bit-repr-c-enum.rs remove support for extern-block const intrinsics 2024-11-04 23:27:45 +01:00
align-with-extern-c-fn.rs
aligned_enum_cast.rs
attr-usage-repr.rs disallow repr() on invalid items 2024-12-05 16:44:00 +01:00
attr-usage-repr.stderr disallow repr() on invalid items 2024-12-05 16:44:00 +01:00
conflicting-repr-hints.rs Move 100 entries from tests/ui into subdirs 2024-05-20 19:55:59 -07:00
conflicting-repr-hints.stderr bump conflicting_repr_hints lint to be shown in dependencies 2024-08-06 11:17:26 +02:00
explicit-rust-repr-conflicts.rs Ban non-array SIMD 2024-09-09 19:39:43 -07:00
explicit-rust-repr-conflicts.stderr
invalid_repr_list_help.rs
invalid_repr_list_help.stderr
issue-83505-repr-simd.rs warn about broken simd not only on structs but also enums and unions when we didn't opt in to it 2025-01-07 21:36:37 +01:00
issue-83505-repr-simd.stderr warn about broken simd not only on structs but also enums and unions when we didn't opt in to it 2025-01-07 21:36:37 +01:00
malformed-repr-hints.rs
malformed-repr-hints.stderr
repr-align-assign.fixed
repr-align-assign.rs
repr-align-assign.stderr
repr-align.rs
repr-align.stderr
repr-c-dead-variants.aarch64-unknown-linux-gnu.stderr adjust UI tests 2025-01-10 02:22:57 +01:00
repr-c-dead-variants.armebv7r-none-eabi.stderr adjust UI tests 2025-01-10 02:22:57 +01:00
repr-c-dead-variants.i686-pc-windows-msvc.stderr adjust UI tests 2025-01-10 02:22:57 +01:00
repr-c-dead-variants.rs adjust UI tests 2025-01-10 02:22:57 +01:00
repr-c-dead-variants.x86_64-unknown-linux-gnu.stderr adjust UI tests 2025-01-10 02:22:57 +01:00
repr-c-int-dead-variants.rs adjust UI tests 2025-01-10 02:22:57 +01:00
repr-c-int-dead-variants.stderr adjust UI tests 2025-01-10 02:22:57 +01:00
repr-disallow-on-variant.rs
repr-disallow-on-variant.stderr
repr-packed-contains-align.rs
repr-packed-contains-align.stderr
repr-transparent-issue-87496.rs
repr-transparent-issue-87496.stderr
repr-transparent-non-exhaustive-transparent-in-prose.rs repr_transparent_external_private_fields: treat rustc_pub_transparent types as local 2024-08-24 23:05:54 +03:00
repr-transparent-non-exhaustive.rs
repr-transparent-non-exhaustive.stderr
repr-transparent-other-items.rs
repr-transparent-other-items.stderr
repr-transparent-other-reprs.rs
repr-transparent-other-reprs.stderr
repr-transparent.rs
repr-transparent.stderr
repr.rs
repr.stderr
repr_align_greater_usize.msp430.stderr Error on alignments greater than isize::MAX 2024-10-28 13:17:37 +08:00
repr_align_greater_usize.rs Error on alignments greater than isize::MAX 2024-10-28 13:17:37 +08:00
repr_c_int_align.rs
transparent-enum-too-many-variants.rs
transparent-enum-too-many-variants.stderr