Create the attribute feature that takes one argument, an identifier, representing the name of a feature. It enables a certain (language, library)feature for the current component. It may only be placed on the root module header. I am not sure if we should gate features themselves behind a flag -Zfeatures or not. rustc uses the stable/nightly distinction for this.
In the future, this attribute may be extended to accept paths of the form component.feature for enabling library features (contrary to language ones) of the given component.
If we don't require the use of -Zfeatures, this allows us to get rid of the special-casing of the distributed library core. core just needs to extend its module header like so:
Create the attribute
feature
that takes one argument, an identifier, representing the name of a feature. It enables a certain (language, library)feature for the current component. It may only be placed on the root module header. I am not sure if we should gate features themselves behind a flag-Zfeatures
or not.rustc
uses the stable/nightly distinction for this.In the future, this attribute may be extended to accept paths of the form
component.feature
for enabling library features (contrary to language ones) of the given component.If we don't require the use of
-Zfeatures
, this allows us to get rid of the special-casing of the distributed librarycore
.core
just needs to extend its module header like so: