View all comments
This is a tracking issue for the lang experiment on externally implementable items. This currently covers these proposals:
The feature gate for the issue is #![feature(extern_item_impls)].
Example of how to use what's implemented now
#![feature(extern_item_impls)]
#[eii(eii1)]
pub fn decl1(x: u64)
// body optional (it's the default)
{
println!("default {x}");
}
// in another crate, maybe
#[eii1]
pub fn decl2(x: u64) {
println!("explicit {x}");
}
fn main() {
decl1(4);
}
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
Unresolved Questions
- Which exact alternative or alternatives should we adopt?
Related
Implementation history
cc @m-ou-se @Amanieu @tmandry @joshtriplett
View all comments
This is a tracking issue for the lang experiment on externally implementable items. This currently covers these proposals:
The feature gate for the issue is
#![feature(extern_item_impls)].Example of how to use what's implemented now
About tracking issues
Tracking issues are used to record the overall progress of implementation. They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions. A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature. Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
no_mangleon EIIs is rejected properlymissing stability attributeerrors with trivial Externally Implementable Item (eii) function inlibrary/std#150514expected statement#149980Instance::mono: DefId(..) has type parameters#149983Nonein find_attr() #149981#[eii]macro using methods on ecx #150906For now: fwd everything: compiler: Forward attributes to eii-expanded macros #150913-Cprefer-dynamicextern_item_implsmiri#5247Unresolved Questions
Related
Implementation history
cc @m-ou-se @Amanieu @tmandry @joshtriplett