@@ -63,7 +63,8 @@ error to specify a feature for a target architecture that the crate is not
6363being compiled for.
6464
6565It is [ undefined behavior] to call a function that is compiled with a feature
66- that is not supported on the current platform the code is running on.
66+ that is not supported on the current platform the code is running on, * except*
67+ if the platform explicitly documents this to be safe.
6768
6869Functions marked with ` target_feature ` are not inlined into a context that
6970does not support the given features. The ` #[inline(always)] ` attribute may not
@@ -75,7 +76,8 @@ The following is a list of the available feature names.
7576
7677#### ` x86 ` or ` x86_64 `
7778
78- This platform requires that ` #[target_feature] ` is only applied to [ ` unsafe `
79+ Executing code with unsupported features is undefined behavior on this platform.
80+ Hence this platform requires that ` #[target_feature] ` is only applied to [ ` unsafe `
7981functions] [ unsafe function ] .
8082
8183Feature | Implicitly Enables | Description
@@ -133,8 +135,12 @@ Feature | Implicitly Enables | Description
133135
134136#### ` wasm32 ` or ` wasm64 `
135137
136- This platform allows ` #[target_feature] ` to be applied to both safe and
137- [ ` unsafe ` functions] [ unsafe function ] .
138+ ` #[target_feature] ` may be used with both safe and
139+ [ ` unsafe ` functions] [ unsafe function ] on Wasm platforms. It is impossible to
140+ cause undefined behavior via the ` #[target_feature] ` attribute because
141+ attempting to use instructions unsupported by the Wasm engine will fail at load
142+ time without the risk of being interpreted in a way different from what the
143+ compiler expected.
138144
139145Feature | Description
140146------------|-------------------
0 commit comments