2
Implement `std::marker::Tuple`, use it in `extern "rust-call"` and `Fn...
source link: https://github.com/rust-lang/rust/pull/99943
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Implements rust-lang/compiler-team#537
I made a few opinionated decisions in this implementation, specifically:
- Enforcing
extern "rust-call"
on fn items during wfcheck, - Enforcing this for all functions (not just ones that have bodies),
- Gating this
Tuple
marker trait behind its own feature, instead of grouping it into (e.g.)unboxed_closures
.
Still needing to be done:
- Enforce that
extern "rust-call"
fn
-ptrs are well-formed only if they have 1/2 args and the second one implementsTuple
. (Doing this would fix ICE in ICE when transmuting to extern "rust-call" fn() #66696.) - Deny all explicit/user
impl
s of theTuple
trait, kinda likeSized
. - Fixing
Tuple
trait built-in impl for chalk, so that chalkification tests are un-broken.
Open questions:
- Does this need t-lang or t-libs signoff?
Fixes #99820
crlf0710, fmease, and Aaron1011 reacted with hooray emojifmease reacted with heart emoji All reactions
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK