rust/compiler/rustc_trait_selection/src
bors 7eef946fc0 Auto merge of #99943 - compiler-errors:tuple-trait, r=jackh726
Implement `std::marker::Tuple`, use it in `extern "rust-call"` and `Fn`-family traits

Implements rust-lang/compiler-team#537

I made a few opinionated decisions in this implementation, specifically:
1. Enforcing `extern "rust-call"` on fn items during wfcheck,
2. Enforcing this for all functions (not just ones that have bodies),
3. Gating this `Tuple` marker trait behind its own feature, instead of grouping it into (e.g.) `unboxed_closures`.

Still needing to be done:
1. Enforce that `extern "rust-call"` `fn`-ptrs are well-formed only if they have 1/2 args and the second one implements `Tuple`. (Doing this would fix ICE in #66696.)
2. Deny all explicit/user `impl`s of the `Tuple` trait, kinda like `Sized`.
3. Fixing `Tuple` trait built-in impl for chalk, so that chalkification tests are un-broken.

Open questions:
1. Does this need t-lang or t-libs signoff?

Fixes #99820
2022-11-06 17:48:33 +00:00
..
traits Auto merge of #99943 - compiler-errors:tuple-trait, r=jackh726 2022-11-06 17:48:33 +00:00
autoderef.rs Remove TypeckResults from InferCtxt 2022-10-07 07:06:19 -05:00
errors.rs Auto merge of #103217 - mejrs:track, r=eholk 2022-11-01 21:09:45 +00:00
infer.rs Some tracing and comment cleanups 2022-11-04 17:10:07 +00:00
lib.rs remove cfg(bootstrap) 2022-09-26 10:14:45 +02:00