rust/compiler
bors ed43cbcb88 Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors
remove support for the (unstable) #[start] attribute

As explained by `@Noratrieb:`
`#[start]` should be deleted. It's nothing but an accidentally leaked implementation detail that's a not very useful mix between "portable" entrypoint logic and bad abstraction.

I think the way the stable user-facing entrypoint should work (and works today on stable) is pretty simple:
- `std`-using cross-platform programs should use `fn main()`. the compiler, together with `std`, will then ensure that code ends up at `main` (by having a platform-specific entrypoint that gets directed through `lang_start` in `std` to `main` - but that's just an implementation detail)
- `no_std` platform-specific programs should use `#![no_main]` and define their own platform-specific entrypoint symbol with `#[no_mangle]`, like `main`, `_start`, `WinMain` or `my_embedded_platform_wants_to_start_here`. most of them only support a single platform anyways, and need cfg for the different platform's ways of passing arguments or other things *anyways*

`#[start]` is in a super weird position of being neither of those two. It tries to pretend that it's cross-platform, but its signature is  a total lie. Those arguments are just stubbed out to zero on ~~Windows~~ wasm, for example. It also only handles the platform-specific entrypoints for a few platforms that are supported by `std`, like Windows or Unix-likes. `my_embedded_platform_wants_to_start_here` can't use it, and neither could a libc-less Linux program.
So we have an attribute that only works in some cases anyways, that has a signature that's a total lie (and a signature that, as I might want to add, has changed recently, and that I definitely would not be comfortable giving *any* stability guarantees on), and where there's a pretty easy way to get things working without it in the first place.

Note that this feature has **not** been RFCed in the first place.

*This comment was posted [in May](https://github.com/rust-lang/rust/issues/29633#issuecomment-2088596042) and so far nobody spoke up in that issue with a usecase that would require keeping the attribute.*

Closes https://github.com/rust-lang/rust/issues/29633

try-job: x86_64-gnu-nopt
try-job: x86_64-msvc-1
try-job: x86_64-msvc-2
try-job: test-various
2025-01-21 19:46:20 +00:00
..
rustc switch jemalloc-sys back to tikv-jemalloc-sys, and update to 0.6.0 2024-12-03 08:56:33 +00:00
rustc_abi Auto merge of #135047 - Flakebi:amdgpu-kernel-cc, r=workingjubilee 2025-01-17 04:36:09 +00:00
rustc_arena Add inherent versions of MaybeUninit methods for slices 2025-01-11 23:57:00 -05:00
rustc_ast Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_ast_ir Add sugar for &pin (const|mut) types 2024-10-07 11:15:04 -07:00
rustc_ast_lowering Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_ast_passes Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_ast_pretty Rename PatKind::Lit to Expr 2025-01-08 07:34:59 +00:00
rustc_attr_data_structures allowed_through_unstable_modules: support showing a deprecation message when the unstable module name is used 2025-01-15 09:41:33 +01:00
rustc_attr_parsing Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_baked_icu_data Delete the cfg(not(parallel)) serial compiler 2024-11-12 13:38:58 +00:00
rustc_borrowck Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_builtin_macros remove support for the #[start] attribute 2025-01-21 06:59:15 -07:00
rustc_codegen_cranelift Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_codegen_gcc Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_codegen_llvm Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_codegen_ssa Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_const_eval Rollup merge of #134858 - estebank:issue-81370, r=Noratrieb 2025-01-19 11:48:15 +01:00
rustc_data_structures Auto merge of #135592 - matthiaskrgr:rollup-4t69l7i, r=matthiaskrgr 2025-01-16 21:31:19 +00:00
rustc_driver
rustc_driver_impl Rollup merge of #135330 - bjorn3:respect_sysroot_in_version_printing, r=lqd 2025-01-20 20:58:35 +01:00
rustc_error_codes Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_error_messages Convert some Into impls into From impls 2024-12-31 01:56:33 +00:00
rustc_errors Manual cleanup of some is_{or_none|some_and} usages 2025-01-19 20:50:43 +00:00
rustc_expand Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_feature Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_fluent_macro use tracked_path in rustc_fluent_macro 2024-10-19 22:32:38 +08:00
rustc_fs_util Couple of changes to make it easier to compile rustc for wasm 2024-09-26 19:51:14 +00:00
rustc_graphviz Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustc_hir Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_hir_analysis Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_hir_pretty Treat safe target_feature functions as unsafe by default 2025-01-15 08:58:17 +00:00
rustc_hir_typeck Auto merge of #133830 - compiler-errors:span-key, r=lcnr 2025-01-21 12:33:33 +00:00
rustc_incremental turn hir::ItemKind::Fn into a named-field variant 2025-01-04 11:35:31 +01:00
rustc_index Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_index_macros update rustc_index_macros feature handling 2024-12-19 20:32:12 +03:00
rustc_infer Get rid of ToPolyTraitRef 2025-01-18 18:47:17 +00:00
rustc_interface Rollup merge of #135330 - bjorn3:respect_sysroot_in_version_printing, r=lqd 2025-01-20 20:58:35 +01:00
rustc_lexer Add test to check unicode identifier version 2024-12-09 06:23:59 -08:00
rustc_lint Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_lint_defs Rollup merge of #132397 - m-ou-se:warn-missing-abi, r=Nadrieril 2025-01-15 04:08:10 -05:00
rustc_llvm llvm: Ignore error value that is always false 2025-01-07 01:02:22 +00:00
rustc_log Avoid naming variables str 2025-01-07 14:30:02 +02:00
rustc_macros Avoid naming variables str 2025-01-07 14:30:02 +02:00
rustc_metadata Manual cleanup of some is_{or_none|some_and} usages 2025-01-19 20:50:43 +00:00
rustc_middle Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_mir_build Auto merge of #135754 - jieyouxu:rollup-j4q1hpr, r=jieyouxu 2025-01-20 10:35:43 +00:00
rustc_mir_dataflow Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_mir_transform Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_monomorphize Make sure we actually use the right trivial lifetime substs when eagerly monomorphizing drop for structs 2025-01-15 04:20:25 +00:00
rustc_next_trait_solver Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_parse Run clippy --fix for unnecessary_map_or lint 2025-01-19 19:15:00 +00:00
rustc_parse_format add suggestion for wrongly ordered format parameters 2024-12-30 06:14:26 -08:00
rustc_passes Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_pattern_analysis rename BitSet to DenseBitSet 2025-01-11 11:34:01 +00:00
rustc_privacy Emit a single privacy error for multiple fields on the same struct expression 2025-01-18 20:33:15 +00:00
rustc_query_impl don't return an Option from try_find_dep_kind 2025-01-07 21:57:00 +01:00
rustc_query_system remove code duplication when hashing query result and interning node 2025-01-13 20:25:46 +01:00
rustc_resolve Rollup merge of #135676 - yotamofek:resolve-cleanups, r=BoxyUwU 2025-01-20 21:45:06 +08:00
rustc_sanitizers Eliminate an unnecessary Symbol::to_string; use as_str 2025-01-07 14:24:47 +02:00
rustc_serialize Fix explicit_iter_loop in rustc_serialize 2024-10-16 15:44:16 +02:00
rustc_session Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_smir Revert "Auto merge of #134330 - scottmcm:no-more-rvalue-len, r=matthewjasper" 2025-01-18 22:09:34 +00:00
rustc_span Rename FileName::QuoteExpansion to CfgSpec 2025-01-19 14:18:46 -08:00
rustc_symbol_mangling Fix legacy symbol mangling of closures 2025-01-14 16:33:03 +00:00
rustc_target Auto merge of #135534 - folkertdev:fix-wasm-i128-f128, r=tgross35 2025-01-17 15:07:28 +00:00
rustc_trait_selection Auto merge of #134299 - RalfJung:remove-start, r=compiler-errors 2025-01-21 19:46:20 +00:00
rustc_traits Delay a bug when encountering an impl with unconstrained generics in codegen_select 2024-11-23 05:27:45 +00:00
rustc_transmute add comment explaining why ty_and_layout_field is not used 2024-12-18 11:01:54 +01:00
rustc_ty_utils new solver: prefer trivial builtin impls over where-clauses 2025-01-17 18:50:29 +00:00
rustc_type_ir Auto merge of #133830 - compiler-errors:span-key, r=lcnr 2025-01-21 12:33:33 +00:00
rustc_type_ir_macros do not relate Abi and Safety 2024-10-22 23:13:04 +02:00
stable_mir Add gpu-kernel calling convention 2025-01-16 00:26:55 +01:00