Skip to content

Commit 9ccc7b5

Browse files
committed
Minor fixups in the generator
Also removes unused additional impl support
1 parent d46a82d commit 9ccc7b5

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

fearless_simd_core/gen/src/data/x86.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ macro_rules! f {
44
($(#[doc = $doc_addition: literal])*
55
struct $module: ident:: $struct_name: ident($display_name: literal): $feature_name: literal + [$($implicitly_enabled: literal),*]
66
fn $example_function_name: ident
7-
$($additional_impls: tt)*
87
) => {
98
Feature {
109
struct_name: stringify!($struct_name),
@@ -13,7 +12,6 @@ macro_rules! f {
1312
extra_docs: concat!($($doc_addition, "\n",)*),
1413
example_function_name: stringify!($example_function_name),
1514
feature_docs_name: $display_name,
16-
additional_impls: stringify!($($additional_impls)*),
1715
module: stringify!($module)
1816
}
1917
}
@@ -285,7 +283,7 @@ pub(crate) const X86_FEATURES: &[Feature] = &[
285283
/// ["rdseed"] --- Read random seed
286284
///
287285
/// ["rdseed"]: https://en.wikipedia.org/wiki/RdRand
288-
struct crypto::Rdseed("`rdseed"): "rdseed" + []
286+
struct crypto::Rdseed("`rdseed`"): "rdseed" + []
289287
fn uses_rdseed
290288
),
291289
f!(

fearless_simd_core/gen/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,6 @@ struct Feature {
104104
example_function_name: &'static str,
105105
/// The "display name" for the feature, used inside the docs.
106106
feature_docs_name: &'static str,
107-
/// Extra code added at the end.
108-
/// Used for implicitly enabled features.
109-
additional_impls: &'static str,
110107
/// The module (if any) this feature will belong to.
111108
///
112109
/// (Note that imports into the module are checked to exist, but not automatically inserted).

fearless_simd_core/gen/templates/x86.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ impl FEATURE_STRUCT_NAME {
6262
}
6363

6464
#[target_feature(enable = "{FEATURE_ID}")]
65-
/// Create a new token for the "{FEATURE_ID}" target feature is enabled.
65+
/// Create a new token for the "{FEATURE_ID}" target feature.
6666
///
6767
/// This method is useful to get a new token if you have an external proof that
68-
/// {FEATURE_ID} is available. This could happen if you are in a target feature
68+
/// {FEATURE_DOCS_NAME} is available. This could happen if you are in a target feature
6969
/// function called by an external library user.
7070
///
7171
/// # Safety
7272
///
7373
/// No conditions other than those inherited from the target feature attribute,
74-
/// i.e. that the "{FEATURE_DOCS_NAME}" target feature is available.
74+
/// i.e. that the "{FEATURE_ID}" target feature is available.
7575
///
7676
/// [implicitly enables]: https://doc.rust-lang.org/beta/reference/attributes/codegen.html?highlight=implicitly%20enabled#r-attributes.codegen.target_feature.safety-restrictions
7777
pub fn new() -> Self {

0 commit comments

Comments
 (0)