1
Fork 0

Allow #[target_feature] on main and start for WASM

This commit is contained in:
Léo Lanteri Thauvin 2023-03-10 13:27:13 +01:00
parent 963305bda8
commit 29b1789a75
2 changed files with 14 additions and 2 deletions

View file

@ -242,6 +242,9 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: DefId) -> CodegenFnAttrs {
// Note that this is also allowed if `actually_rustdoc` so
// if a target is documenting some wasm-specific code then
// it's not spuriously denied.
//
// This exception needs to be kept in sync with allowing
// `#[target_feature]` on `main` and `start`.
} else if !tcx.features().target_feature_11 {
let mut err = feature_err(
&tcx.sess.parse_sess,