rust/compiler/rustc_middle
Matthias Krüger 6457761f80
Rollup merge of #133934 - jswrenn:unsafe-fields-auto-traits, r=compiler-errors
Do not implement unsafe auto traits for types with unsafe fields

If a type has unsafe fields, its safety invariants are not simply the conjunction of its field types' safety invariants. Consequently, it's invalid to reason about the safety properties of these types in a purely structural manner — i.e., the manner in which `auto` traits are implemented. Consequently, auto implementations of unsafe auto traits should not be generated for types with unsafe fields.

Tracking: #132922

r? `@compiler-errors`
2024-12-06 21:21:07 +01:00
..
src Rollup merge of #133934 - jswrenn:unsafe-fields-auto-traits, r=compiler-errors 2024-12-06 21:21:07 +01:00
Cargo.toml Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
messages.ftl Move some code from Compiler::enter to GlobalCtxt::finish 2024-11-09 17:55:39 +00:00
README.md

For more information about how rustc works, see the rustc dev guide.