rust/compiler/rustc_passes
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
..
src Rollup merge of #133925 - folkertdev:improve-repr-warnings, r=compiler-errors 2025-02-06 21:56:24 +01:00
Cargo.toml Auto merge of #134381 - jdonszelmann:move-attribute-types, r=oli-obk 2024-12-17 18:50:50 +00:00
messages.ftl Auto merge of #119286 - jyn514:linker-output, r=bjorn3 2025-01-25 17:16:33 +00:00