Centril / rfc-effects

Preparing an RFC on effect polymorphism in Rust with focus on 'const'
10 stars 0 forks source link

ABI #14

Open gnzlbg opened 4 years ago

gnzlbg commented 4 years ago

One can't be generic over extern "ABI":

extern "C" fn foo() {}
extern "Rust" fn bar() {}

fn baz<T: ??? Fn()>(t: T) { }
baz(foo);
baz(bar);

This is similar to being generic over #[target_feature] (target-features are part of the ABI, or at least affect it).