diff options
author | MikuroXina <ryosukadnak@gmail.com> | 2021-12-07 07:11:48 +0900 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2021-12-07 00:18:32 +0100 |
commit | b1af6a42f583badc425c10cbbefb9dc4c833301e (patch) | |
tree | 2072b9b33ec68918757e7a91b67aa1de313f9956 /src | |
parent | 89032649044d875983a851fff6fbde2d4e2ceaeb (diff) |
Remove fields never read
Diffstat (limited to 'src')
-rw-r--r-- | src/ir/context.rs | 11 | ||||
-rw-r--r-- | src/ir/function.rs | 5 | ||||
-rw-r--r-- | src/lib.rs | 9 |
3 files changed, 5 insertions, 20 deletions
diff --git a/src/ir/context.rs b/src/ir/context.rs index a9e19fb2..b2e6f985 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -364,9 +364,6 @@ pub struct BindgenContext { in_codegen: bool, - /// The clang index for parsing. - index: clang::Index, - /// The translation unit for parsing. translation_unit: clang::TranslationUnit, @@ -420,12 +417,6 @@ pub struct BindgenContext { /// and is always `None` before that and `Some` after. cannot_derive_copy: Option<HashSet<ItemId>>, - /// The set of (`ItemId`s of) types that can't derive copy in array. - /// - /// This is populated when we enter codegen by `compute_cannot_derive_copy` - /// and is always `None` before that and `Some` after. - cannot_derive_copy_in_array: Option<HashSet<ItemId>>, - /// The set of (`ItemId`s of) types that can't derive hash. /// /// This is populated when we enter codegen by `compute_can_derive_hash` @@ -569,7 +560,6 @@ If you encounter an error missing from this list, please file an issue or a PR!" replacements: Default::default(), collected_typerefs: false, in_codegen: false, - index, translation_unit, target_info, options, @@ -582,7 +572,6 @@ If you encounter an error missing from this list, please file an issue or a PR!" cannot_derive_debug: None, cannot_derive_default: None, cannot_derive_copy: None, - cannot_derive_copy_in_array: None, cannot_derive_hash: None, cannot_derive_partialeq_or_partialord: None, sizedness: None, diff --git a/src/ir/function.rs b/src/ir/function.rs index a3a2bbfb..0ba2d1ee 100644 --- a/src/ir/function.rs +++ b/src/ir/function.rs @@ -131,6 +131,11 @@ impl Function { self.signature } + /// Get this function's comment. + pub fn comment(&self) -> Option<&str> { + self.comment.as_deref() + } + /// Get this function's kind. pub fn kind(&self) -> FunctionKind { self.kind @@ -1827,13 +1827,6 @@ struct BindgenOptions { /// Whether to time the bindgen phases. time_phases: bool, - /// True if we should generate constant names that are **directly** under - /// namespaces. - namespaced_constants: bool, - - /// True if we should use MSVC name mangling rules. - msvc_mangling: bool, - /// Whether we should convert float types to f32/f64 types. convert_floats: bool, @@ -2084,8 +2077,6 @@ impl Default for BindgenOptions { use_core: false, ctypes_prefix: None, anon_fields_prefix: DEFAULT_ANON_FIELDS_PREFIX.into(), - namespaced_constants: true, - msvc_mangling: false, convert_floats: true, raw_lines: vec![], module_lines: HashMap::default(), |