rust/compiler/rustc_passes/src
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
..
liveness Reformat use declarations. 2024-07-29 08:26:52 +10:00
abi_test.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
check_attr.rs Rollup merge of #133925 - folkertdev:improve-repr-warnings, r=compiler-errors 2025-02-06 21:56:24 +01:00
dead.rs Handle all PatExprs in dead code analysis 2025-01-29 15:45:13 +00:00
debugger_visualizer.rs Use SourceMap to load debugger visualizer files 2024-12-08 18:57:04 +00:00
diagnostic_items.rs Add tcx.visible_traits() and use it for producing diagnostics 2025-01-14 08:51:19 +00:00
entry.rs remove support for the #[start] attribute 2025-01-21 06:59:15 -07:00
errors.rs Rollup merge of #136032 - estebank:issue-136028, r=SparrowLii 2025-01-25 23:27:01 -05:00
hir_id_validator.rs Use a different hir type for patterns in pattern types than we use in match patterns 2025-02-03 08:18:30 +00:00
input_stats.rs Overhaul to_readable_str. 2025-01-31 16:04:13 +11:00
lang_items.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
layout_test.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
lib_features.rs Re-export more rustc_span::symbol things from rustc_span. 2024-12-18 13:38:53 +11:00
lib.rs Get rid of HIR const checker 2024-11-22 02:32:26 +00:00
liveness.rs Rollup merge of #135840 - vayunbiyani:omit_intrinsic_unused_param_warning, r=oli-obk 2025-02-01 01:19:19 +01:00
loops.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
naked_functions.rs turn hir::ItemKind::Fn into a named-field variant 2025-01-04 11:35:31 +01:00
reachable.rs turn hir::ItemKind::Fn into a named-field variant 2025-01-04 11:35:31 +01:00
stability.rs rustc_allowed_through_unstable_modules: require deprecation message 2025-02-02 12:36:12 +01:00
upvars.rs Add warn(unreachable_pub) to rustc_passes. 2024-08-29 20:18:40 +10:00
weak_lang_items.rs Add support for wasm exception handling to Emscripten target 2025-01-06 10:29:54 +01:00