Skip to content

Commit b1af6a4

Browse files
MikuroXinaemilio
authored andcommitted
Remove fields never read
1 parent 8903264 commit b1af6a4

File tree

3 files changed

+5
-20
lines changed

3 files changed

+5
-20
lines changed

src/ir/context.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,6 @@ pub struct BindgenContext {
364364

365365
in_codegen: bool,
366366

367-
/// The clang index for parsing.
368-
index: clang::Index,
369-
370367
/// The translation unit for parsing.
371368
translation_unit: clang::TranslationUnit,
372369

@@ -420,12 +417,6 @@ pub struct BindgenContext {
420417
/// and is always `None` before that and `Some` after.
421418
cannot_derive_copy: Option<HashSet<ItemId>>,
422419

423-
/// The set of (`ItemId`s of) types that can't derive copy in array.
424-
///
425-
/// This is populated when we enter codegen by `compute_cannot_derive_copy`
426-
/// and is always `None` before that and `Some` after.
427-
cannot_derive_copy_in_array: Option<HashSet<ItemId>>,
428-
429420
/// The set of (`ItemId`s of) types that can't derive hash.
430421
///
431422
/// 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!"
569560
replacements: Default::default(),
570561
collected_typerefs: false,
571562
in_codegen: false,
572-
index,
573563
translation_unit,
574564
target_info,
575565
options,
@@ -582,7 +572,6 @@ If you encounter an error missing from this list, please file an issue or a PR!"
582572
cannot_derive_debug: None,
583573
cannot_derive_default: None,
584574
cannot_derive_copy: None,
585-
cannot_derive_copy_in_array: None,
586575
cannot_derive_hash: None,
587576
cannot_derive_partialeq_or_partialord: None,
588577
sizedness: None,

src/ir/function.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ impl Function {
131131
self.signature
132132
}
133133

134+
/// Get this function's comment.
135+
pub fn comment(&self) -> Option<&str> {
136+
self.comment.as_deref()
137+
}
138+
134139
/// Get this function's kind.
135140
pub fn kind(&self) -> FunctionKind {
136141
self.kind

src/lib.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,13 +1827,6 @@ struct BindgenOptions {
18271827
/// Whether to time the bindgen phases.
18281828
time_phases: bool,
18291829

1830-
/// True if we should generate constant names that are **directly** under
1831-
/// namespaces.
1832-
namespaced_constants: bool,
1833-
1834-
/// True if we should use MSVC name mangling rules.
1835-
msvc_mangling: bool,
1836-
18371830
/// Whether we should convert float types to f32/f64 types.
18381831
convert_floats: bool,
18391832

@@ -2084,8 +2077,6 @@ impl Default for BindgenOptions {
20842077
use_core: false,
20852078
ctypes_prefix: None,
20862079
anon_fields_prefix: DEFAULT_ANON_FIELDS_PREFIX.into(),
2087-
namespaced_constants: true,
2088-
msvc_mangling: false,
20892080
convert_floats: true,
20902081
raw_lines: vec![],
20912082
module_lines: HashMap::default(),

0 commit comments

Comments
 (0)