rust/src/test/ui/lang-items
Manish Goregaokar 3d86aac990
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
..
fn-fn_mut-call-ill-formed.rs Make error message for malformed fn/fn_mut lang item more specific 2021-09-24 20:15:19 +02:00
fn-fn_mut-call-ill-formed.stderr Make error message for malformed fn/fn_mut lang item more specific 2021-09-24 20:15:19 +02:00
issue-83471.rs Add basic checks for well-formedness of fn/fn_mut lang items 2021-09-24 18:26:27 +02:00
issue-83471.stderr Add basic checks for well-formedness of fn/fn_mut lang items 2021-09-24 18:26:27 +02:00
issue-86238.rs Report an error if resolution of closure call functions failed 2021-06-12 18:32:25 +02:00
issue-86238.stderr Reword error message slightly 2021-07-01 13:26:17 +02:00
lang-item-correct-generics.rs Detect incorrect number of lang item generics 2021-08-23 10:15:25 -04:00
lang-item-generic-requirements.rs Fix ICE when start lang item has wrong generics 2021-09-14 15:59:55 -04:00
lang-item-generic-requirements.stderr Fix ICE when start lang item has wrong generics 2021-09-14 15:59:55 -04:00
lang-item-missing-generator.rs
lang-item-missing-generator.stderr
lang-item-missing.rs
lang-item-missing.stderr