Manish Goregaokar 730d86f521 Rollup merge of #88782 - asquared31415:issue-79559, r=cjgillot
Fix ICE when `start` lang item has wrong generics

In my previous pr #87875 I missed the requirements on the `start` lang item due to its relative difficulty to test and opting for more conservative estimates.  This fixes that by updating the requirement to be exactly one generic type.

The `start` lang item should have exactly one generic type for the return type of the `main` fn ptr passed to it.  I believe having zero would previously *sometimes* compile (often with the use of `fn() -> ()` as the fn ptr but it was likely UB to call if the return type of `main` was not `()` as far as I know) however it also sometimes would not for various errors including ICEs and LLVM errors depending on exact situations.  Having more than 1 generic has always failed with an ICE because only the one generic type is expected and provided.

Fixes #79559, fixes #73584, fixes #83117 (all duplicates)
Relevant to #9307

r? ````@cjgillot````
2021-09-30 18:05:20 -07:00
..
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-06-18 16:11:32 +08:00
2021-06-18 16:11:32 +08:00
2021-06-18 16:11:32 +08:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-09-14 18:47:47 -04:00
2021-09-14 18:47:47 -04:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-06-18 16:20:30 +08:00
2021-06-18 16:20:30 +08:00
2021-06-18 16:11:32 +08:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-06-04 08:05:54 -04:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-07-27 16:26:50 -04:00
2021-07-27 16:26:50 -04:00
2021-07-27 16:26:50 -04:00
2021-07-27 16:26:50 -04:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-03-03 11:23:29 +01:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00
2021-08-11 14:21:33 +00:00