rust/compiler/rustc_middle/src
bors f4966590d8 Auto merge of #131045 - compiler-errors:remove-unnamed_fields, r=wesleywiser
Retire the `unnamed_fields` feature for now

`#![feature(unnamed_fields)]` was implemented in part in #115131 and #115367, however work on that feature has (afaict) stalled and in the mean time there have been some concerns raised (e.g.[^1][^2]) about whether `unnamed_fields` is worthwhile to have in the language, especially in its current desugaring. Because it represents a compiler implementation burden including a new kind of anonymous ADT and additional complication to field selection, and is quite prone to bugs today, I'm choosing to remove the feature.

However, since I'm not one to really write a bunch of words, I'm specifically *not* going to de-RFC this feature. This PR essentially *rolls back* the state of this feature to "RFC accepted but not yet implemented"; however if anyone wants to formally unapprove the RFC from the t-lang side, then please be my guest. I'm just not totally willing to summarize the various language-facing reasons for why this feature is or is not worthwhile, since I'm coming from the compiler side mostly.

Fixes #117942
Fixes #121161
Fixes #121263
Fixes #121299
Fixes #121722
Fixes #121799
Fixes #126969
Fixes #131041

Tracking:
* https://github.com/rust-lang/rust/issues/49804

[^1]: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Unnamed.20struct.2Funion.20fields
[^2]: https://github.com/rust-lang/rust/issues/49804#issuecomment-1972619108
2024-10-11 13:11:13 +00:00
..
dep_graph Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
hir rm ItemKind::OpaqueTy 2024-10-04 23:28:22 +00:00
hooks Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
infer Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
middle Simplify bound var resolution. 2024-10-04 23:44:27 +00:00
mir coverage. Adapt to mcdc mapping formats introduced by llvm 19 2024-10-08 11:15:24 +08:00
query Simplify bound var resolution. 2024-10-04 23:44:27 +00:00
thir various fixes for naked_asm! implementation 2024-10-06 19:00:09 +02:00
traits Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
ty Auto merge of #131045 - compiler-errors:remove-unnamed_fields, r=wesleywiser 2024-10-11 13:11:13 +00:00
util Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
arena.rs Compiler: Rename "object safe" to "dyn compatible" 2024-09-25 13:26:48 +02:00
error.rs Use bool in favor of Option<()> for diagnostics 2024-08-21 01:31:11 -04:00
lib.rs make InterpResult a dedicated type to avoid accidentally discarding the error 2024-10-01 21:45:35 +02:00
lint.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
macros.rs Improve const traits diagnostics for new desugaring 2024-10-02 19:45:17 +08:00
metadata.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
tests.rs Give an item related to issue 27438 a more meaningful name 2024-04-30 22:27:19 +02:00
thir.rs various fixes for naked_asm! implementation 2024-10-06 19:00:09 +02:00
values.rs only query params_in_repr if def kind is adt 2024-10-02 17:36:31 +08:00