Skip to content

Commit a75c97f

Browse files
committed
Fix typos.
1 parent fa04ced commit a75c97f

File tree

13 files changed

+57
-57
lines changed

13 files changed

+57
-57
lines changed

Diff for: bindgen-tests/tests/expectations/tests/layout_eth_conf.rs

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: bindgen-tests/tests/expectations/tests/layout_eth_conf_1_0.rs

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: bindgen-tests/tests/quickchecking/src/fuzzers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl fmt::Display for DeclarationListC {
231231
}
232232
}
233233

234-
/// A qucickcheck trait for describing how BaseTypeC types can be
234+
/// A quickcheck trait for describing how BaseTypeC types can be
235235
/// randomly generated and shrunk.
236236
impl Arbitrary for BaseTypeC {
237237
fn arbitrary(g: &mut Gen) -> BaseTypeC {

Diff for: bindgen/codegen/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ struct CodegenResult<'a> {
222222
items: Vec<proc_macro2::TokenStream>,
223223
dynamic_items: DynamicItems,
224224

225-
/// A monotonic counter used to add stable unique id's to stuff that doesn't
225+
/// A monotonic counter used to add stable unique ID's to stuff that doesn't
226226
/// need to be referenced by anything.
227227
codegen_id: &'a Cell<usize>,
228228

@@ -694,7 +694,7 @@ impl CodeGenerator for Var {
694694
// Account the trailing zero.
695695
//
696696
// TODO: Here we ignore the type we just made up, probably
697-
// we should refactor how the variable type and ty id work.
697+
// we should refactor how the variable type and ty ID work.
698698
let len = bytes.len() + 1;
699699
let ty = quote! {
700700
[u8; #len]

Diff for: bindgen/ir/analysis/sizedness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ impl<'ctx> From<SizednessAnalysis<'ctx>> for HashMap<TypeId, SizednessResult> {
346346
}
347347
}
348348

349-
/// A convenience trait for querying whether some type or id is sized.
349+
/// A convenience trait for querying whether some type or ID is sized.
350350
///
351351
/// This is not for _computing_ whether the thing is sized, it is for looking up
352352
/// the results of the `Sizedness` analysis's computations for a specific thing.

Diff for: bindgen/ir/analysis/template_params.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ impl<'ctx> UsedTemplateParameters<'ctx> {
329329
}
330330
}
331331

332-
/// The join operation on our lattice: the set union of all of this id's
332+
/// The join operation on our lattice: the set union of all of this ID's
333333
/// successors.
334334
fn constrain_join(&self, used_by_this_id: &mut ItemSet, item: &Item) {
335335
trace!(" other item: join with successors' usage");
@@ -518,7 +518,7 @@ impl<'ctx> MonotoneFramework for UsedTemplateParameters<'ctx> {
518518
// exiting this method.
519519
extra_assert!(self.used.values().all(|v| v.is_some()));
520520

521-
// Take the set for this id out of the hash map while we mutate it based
521+
// Take the set for this ID out of the hash map while we mutate it based
522522
// on other hash map entries. We *must* put it back into the hash map at
523523
// the end of this method. This allows us to side-step HashMap's lack of
524524
// an analog to slice::split_at_mut.

Diff for: bindgen/ir/comp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ impl Method {
121121
self.kind == MethodKind::Static
122122
}
123123

124-
/// Get the id for the `Function` signature for this method.
124+
/// Get the ID for the `Function` signature for this method.
125125
pub(crate) fn signature(&self) -> FunctionId {
126126
self.signature
127127
}

Diff for: bindgen/ir/context.rs

+23-23
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ macro_rules! item_id_newtype {
5454
pub(crate) struct $name(ItemId);
5555

5656
impl $name {
57-
/// Create an `ItemResolver` from this id.
57+
/// Create an `ItemResolver` from this ID.
5858
#[allow(dead_code)]
5959
pub(crate) fn into_resolver(self) -> ItemResolver {
6060
let id: ItemId = self.into();
@@ -127,7 +127,7 @@ item_id_newtype! {
127127
expected = expect_type_id,
128128

129129
/// Convert this `ItemId` into a `TypeId` without actually checking whether
130-
/// this id actually points to a `Type`.
130+
/// this ID actually points to a `Type`.
131131
unchecked = as_type_id_unchecked;
132132
}
133133

@@ -146,7 +146,7 @@ item_id_newtype! {
146146
expected = expect_module_id,
147147

148148
/// Convert this `ItemId` into a `ModuleId` without actually checking
149-
/// whether this id actually points to a `Module`.
149+
/// whether this ID actually points to a `Module`.
150150
unchecked = as_module_id_unchecked;
151151
}
152152

@@ -165,7 +165,7 @@ item_id_newtype! {
165165
expected = expect_var_id,
166166

167167
/// Convert this `ItemId` into a `VarId` without actually checking whether
168-
/// this id actually points to a `Var`.
168+
/// this ID actually points to a `Var`.
169169
unchecked = as_var_id_unchecked;
170170
}
171171

@@ -184,7 +184,7 @@ item_id_newtype! {
184184
expected = expect_function_id,
185185

186186
/// Convert this `ItemId` into a `FunctionId` without actually checking whether
187-
/// this id actually points to a `Function`.
187+
/// this ID actually points to a `Function`.
188188
unchecked = as_function_id_unchecked;
189189
}
190190

@@ -195,7 +195,7 @@ impl From<ItemId> for usize {
195195
}
196196

197197
impl ItemId {
198-
/// Get a numeric representation of this id.
198+
/// Get a numeric representation of this ID.
199199
pub(crate) fn as_usize(&self) -> usize {
200200
(*self).into()
201201
}
@@ -315,7 +315,7 @@ pub(crate) struct BindgenContext {
315315
/// item ids during parsing.
316316
types: HashMap<TypeKey, TypeId>,
317317

318-
/// Maps from a cursor to the item id of the named template type parameter
318+
/// Maps from a cursor to the item ID of the named template type parameter
319319
/// for that cursor.
320320
type_params: HashMap<clang::Cursor, TypeId>,
321321

@@ -328,7 +328,7 @@ pub(crate) struct BindgenContext {
328328
/// Current module being traversed.
329329
current_module: ModuleId,
330330

331-
/// A HashMap keyed on a type definition, and whose value is the parent id
331+
/// A HashMap keyed on a type definition, and whose value is the parent ID
332332
/// of the declaration.
333333
///
334334
/// This is used to handle the cases where the semantic and the lexical
@@ -392,7 +392,7 @@ pub(crate) struct BindgenContext {
392392
/// It's computed right after computing the allowlisted items.
393393
codegen_items: Option<ItemSet>,
394394

395-
/// Map from an item's id to the set of template parameter items that it
395+
/// Map from an item's ID to the set of template parameter items that it
396396
/// uses. See `ir::named` for more details. Always `Some` during the codegen
397397
/// phase.
398398
used_template_parameters: Option<HashMap<ItemId, ItemSet>>,
@@ -1086,7 +1086,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
10861086
// Relocate the replacement item from where it was declared, to
10871087
// where the thing it is replacing was declared.
10881088
//
1089-
// First, we'll make sure that its parent id is correct.
1089+
// First, we'll make sure that its parent ID is correct.
10901090

10911091
let old_parent = self.resolve_item(replacement_id).parent_id();
10921092
if new_parent == old_parent {
@@ -1272,7 +1272,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
12721272
self.sizedness = Some(analyze::<SizednessAnalysis>(self));
12731273
}
12741274

1275-
/// Look up whether the type with the given id is sized or not.
1275+
/// Look up whether the type with the given ID is sized or not.
12761276
pub(crate) fn lookup_sizedness(&self, id: TypeId) -> SizednessResult {
12771277
assert!(
12781278
self.in_codegen_phase(),
@@ -1437,15 +1437,15 @@ If you encounter an error missing from this list, please file an issue or a PR!"
14371437
self.root_module
14381438
}
14391439

1440-
/// Resolve a type with the given id.
1440+
/// Resolve a type with the given ID.
14411441
///
14421442
/// Panics if there is no item for the given `TypeId` or if the resolved
14431443
/// item is not a `Type`.
14441444
pub(crate) fn resolve_type(&self, type_id: TypeId) -> &Type {
14451445
self.resolve_item(type_id).kind().expect_type()
14461446
}
14471447

1448-
/// Resolve a function with the given id.
1448+
/// Resolve a function with the given ID.
14491449
///
14501450
/// Panics if there is no item for the given `FunctionId` or if the resolved
14511451
/// item is not a `Function`.
@@ -1454,9 +1454,9 @@ If you encounter an error missing from this list, please file an issue or a PR!"
14541454
}
14551455

14561456
/// Resolve the given `ItemId` as a type, or `None` if there is no item with
1457-
/// the given id.
1457+
/// the given ID.
14581458
///
1459-
/// Panics if the id resolves to an item that is not a type.
1459+
/// Panics if the ID resolves to an item that is not a type.
14601460
pub(crate) fn safe_resolve_type(&self, type_id: TypeId) -> Option<&Type> {
14611461
self.resolve_item_fallible(type_id)
14621462
.map(|t| t.kind().expect_type())
@@ -1473,7 +1473,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
14731473

14741474
/// Resolve the given `ItemId` into an `Item`.
14751475
///
1476-
/// Panics if the given id does not resolve to any item.
1476+
/// Panics if the given ID does not resolve to any item.
14771477
pub(crate) fn resolve_item<Id: Into<ItemId>>(&self, item_id: Id) -> &Item {
14781478
let item_id = item_id.into();
14791479
match self.resolve_item_fallible(item_id) {
@@ -1658,7 +1658,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
16581658
clang_sys::CXCursor_TypeRef |
16591659
clang_sys::CXCursor_TypedefDecl |
16601660
clang_sys::CXCursor_TypeAliasDecl => {
1661-
// The `with_id` id will potentially end up unused if we give up
1661+
// The `with_id` ID will potentially end up unused if we give up
16621662
// on this type (for example, because it has const value
16631663
// template args), so if we pass `with_id` as the parent, it is
16641664
// potentially a dangling reference. Instead, use the canonical
@@ -1953,7 +1953,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
19531953
with_id.as_type_id_unchecked()
19541954
}
19551955

1956-
/// Returns the next item id to be used for an item.
1956+
/// Returns the next item ID to be used for an item.
19571957
pub(crate) fn next_item_id(&mut self) -> ItemId {
19581958
let ret = ItemId(self.items.len());
19591959
self.items.push(None);
@@ -2055,7 +2055,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
20552055
self.in_codegen
20562056
}
20572057

2058-
/// Mark the type with the given `name` as replaced by the type with id
2058+
/// Mark the type with the given `name` as replaced by the type with ID
20592059
/// `potential_ty`.
20602060
///
20612061
/// Replacement types are declared using the `replaces="xxx"` annotation,
@@ -2185,7 +2185,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
21852185
(module_name, kind)
21862186
}
21872187

2188-
/// Given a CXCursor_Namespace cursor, return the item id of the
2188+
/// Given a CXCursor_Namespace cursor, return the item ID of the
21892189
/// corresponding module, or create one on the fly.
21902190
pub(crate) fn module(&mut self, cursor: clang::Cursor) -> ModuleId {
21912191
use clang_sys::*;
@@ -2539,7 +2539,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
25392539
}
25402540
}
25412541

2542-
// Find enums in this module, and record the id of each one that
2542+
// Find enums in this module, and record the ID of each one that
25432543
// has a typedef.
25442544
for child_id in module.children() {
25452545
if let Some(ItemKind::Type(ty)) =
@@ -2837,7 +2837,7 @@ pub(crate) struct ItemResolver {
28372837
}
28382838

28392839
impl ItemId {
2840-
/// Create an `ItemResolver` from this item id.
2840+
/// Create an `ItemResolver` from this item ID.
28412841
pub(crate) fn into_resolver(self) -> ItemResolver {
28422842
self.into()
28432843
}
@@ -2853,7 +2853,7 @@ where
28532853
}
28542854

28552855
impl ItemResolver {
2856-
/// Construct a new `ItemResolver` from the given id.
2856+
/// Construct a new `ItemResolver` from the given ID.
28572857
pub(crate) fn new<Id: Into<ItemId>>(id: Id) -> ItemResolver {
28582858
let id = id.into();
28592859
ItemResolver {

Diff for: bindgen/ir/function.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ pub(crate) struct Function {
8282
/// The mangled name, that is, the symbol.
8383
mangled_name: Option<String>,
8484

85-
/// The id pointing to the current function signature.
85+
/// The ID pointing to the current function signature.
8686
signature: TypeId,
8787

8888
/// The kind of function this is.
@@ -225,7 +225,7 @@ impl quote::ToTokens for Abi {
225225
/// An ABI extracted from a clang cursor.
226226
#[derive(Debug, Copy, Clone)]
227227
pub(crate) enum ClangAbi {
228-
/// An ABI known by rust.
228+
/// An ABI known by Rust.
229229
Known(Abi),
230230
/// An unknown or invalid ABI.
231231
Unknown(CXCallingConv),

Diff for: bindgen/ir/int.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub enum IntKind {
1212
/// An `unsigned char`.
1313
UChar,
1414

15-
/// An `wchar_t`.
15+
/// A `wchar_t`.
1616
WChar,
1717

1818
/// A platform-dependent `char` type, with the signedness support.

0 commit comments

Comments
 (0)