From b213da99373cb47f0fbb754f44c47394c8ae5553 Mon Sep 17 00:00:00 2001 From: soonsouth <163404563+soonsouth@users.noreply.github.com> Date: Sat, 16 Mar 2024 08:35:18 +0800 Subject: [PATCH] chore: fix some typos (#23412) Signed-off-by: soonsouth (cherry picked from commit b387bc49b5425a7b555972184f5f6078b14d4a8b) --- changelogs/changelog_2_0_0_details.md | 2 +- compiler/cgendata.nim | 2 +- compiler/concepts.nim | 2 +- compiler/injectdestructors.nim | 2 +- compiler/sourcemap.nim | 2 +- lib/packages/docutils/rst.nim | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/changelogs/changelog_2_0_0_details.md b/changelogs/changelog_2_0_0_details.md index a38f2b40b7..7027df541b 100644 --- a/changelogs/changelog_2_0_0_details.md +++ b/changelogs/changelog_2_0_0_details.md @@ -72,7 +72,7 @@ - `shallowCopy` and `shallow` are removed for ARC/ORC. Use `move` when possible or combine assignment and `sink` for optimization purposes. -- The experimental `nimPreviewDotLikeOps` switch is going to be removed or deprecated because it didn't fullfill its promises. +- The experimental `nimPreviewDotLikeOps` switch is going to be removed or deprecated because it didn't fulfill its promises. - The `{.this.}` pragma, deprecated since 0.19, has been removed. - `nil` literals can no longer be directly assigned to variables or fields of `distinct` pointer types. They must be converted instead. diff --git a/compiler/cgendata.nim b/compiler/cgendata.nim index 917afe75b1..dd2110a8e2 100644 --- a/compiler/cgendata.nim +++ b/compiler/cgendata.nim @@ -149,7 +149,7 @@ type typeABICache*: HashSet[SigHash] # cache for ABI checks; reusing typeCache # would be ideal but for some reason enums # don't seem to get cached so it'd generate - # 1 ABI check per occurence in code + # 1 ABI check per occurrence in code forwTypeCache*: TypeCache # cache for forward declarations of types declaredThings*: IntSet # things we have declared in this .c file declaredProtos*: IntSet # prototypes we have declared in this .c file diff --git a/compiler/concepts.nim b/compiler/concepts.nim index c980cf7ef2..1d0f36dc05 100644 --- a/compiler/concepts.nim +++ b/compiler/concepts.nim @@ -314,7 +314,7 @@ proc conceptMatchNode(c: PContext; n: PNode; m: var MatchCon): bool = proc conceptMatch*(c: PContext; concpt, arg: PType; bindings: var TIdTable; invocation: PType): bool = ## Entry point from sigmatch. 'concpt' is the concept we try to match (here still a PType but - ## we extract its AST via 'concpt.n.lastSon'). 'arg' is the type that might fullfill the + ## we extract its AST via 'concpt.n.lastSon'). 'arg' is the type that might fulfill the ## concept's requirements. If so, we return true and fill the 'bindings' with pairs of ## (typeVar, instance) pairs. ('typeVar' is usually simply written as a generic 'T'.) ## 'invocation' can be nil for atomic concepts. For non-atomic concepts, it contains the diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim index 7ff2829ff1..f728688d97 100644 --- a/compiler/injectdestructors.nim +++ b/compiler/injectdestructors.nim @@ -296,7 +296,7 @@ proc genSink(c: var Con; s: var Scope; dest, ri: PNode; flags: set[MoveOrCopyFla proc isCriticalLink(dest: PNode): bool {.inline.} = #[ Lins's idea that only "critical" links can introduce a cycle. This is - critical for the performance gurantees that we strive for: If you + critical for the performance guarantees that we strive for: If you traverse a data structure, no tracing will be performed at all. ORC is about this promise: The GC only touches the memory that the mutator touches too. diff --git a/compiler/sourcemap.nim b/compiler/sourcemap.nim index 2fcc50bbe9..cb50a546c5 100644 --- a/compiler/sourcemap.nim +++ b/compiler/sourcemap.nim @@ -11,7 +11,7 @@ type Mapping = object ## Mapping refers to a line in the JS output. ## It is made up of segments which refer to the tokens in the line - case inSource: bool # Whether the line in JS has Nim equivilant + case inSource: bool # Whether the line in JS has Nim equivalent of true: file: int # Index into files list line: int # 0 indexed line of code in the Nim source diff --git a/lib/packages/docutils/rst.nim b/lib/packages/docutils/rst.nim index 2894010ef5..f1c8a99317 100644 --- a/lib/packages/docutils/rst.nim +++ b/lib/packages/docutils/rst.nim @@ -378,8 +378,8 @@ type kind: FootnoteType # discriminator number: int # valid for fnManualNumber (always) and fnAutoNumber, # fnAutoNumberLabel after resolveSubs is called - autoNumIdx: int # order of occurence: fnAutoNumber, fnAutoNumberLabel - autoSymIdx: int # order of occurence: fnAutoSymbol + autoNumIdx: int # order of occurrence: fnAutoNumber, fnAutoNumberLabel + autoSymIdx: int # order of occurrence: fnAutoSymbol label: string # valid for fnAutoNumberLabel RstFileTable* = object filenameToIdx*: Table[string, FileIndex]