Parcourir la source

chore: fix typos (#3738)

Signed-off-by: cui fliter <imcusg@gmail.com>
cui fliter il y a 2 ans
Parent
commit
fea2651e7c

+ 1 - 1
common/hashing.h

@@ -375,7 +375,7 @@ class Hasher {
   // which will generate 8 64-bit values and one more digit. The `bc` command's
   // decimal based scaling means that without getting at least some extra hex
   // digits rendered there will be rounding that we don't want so the script
-  // below goes on to produce one more hex digit ensuring the the 8 initializers
+  // below goes on to produce one more hex digit ensuring the 8 initializers
   // aren't rounded in any way. Using a higher scale won't cause the 8
   // initializers here to change further.
   //

+ 1 - 1
docs/design/generics/details.md

@@ -4560,7 +4560,7 @@ declarations are selected.
     impl and `Z(i16)` for `i8` using the second. In this case,
     `(i8 as Z(i16)).Cond == Y`.
 
-There is no reason to to prefer one of these outcomes over the other.
+There is no reason to prefer one of these outcomes over the other.
 
 **Example:** Further, cycles can create contradictions in the type system:
 

+ 1 - 1
explorer/ast/pattern.h

@@ -115,7 +115,7 @@ auto VisitNestedPatterns(const Pattern& pattern,
 inline auto VisitNestedPatterns(Pattern& pattern,
                                 llvm::function_ref<bool(Pattern&)> visitor)
     -> bool {
-  // The non-const version is is implemented in terms of the const version. The
+  // The non-const version is implemented in terms of the const version. The
   // const_cast is safe because every pattern reachable through a non-const
   // pattern is also non-const.
   const Pattern& const_pattern = pattern;

+ 1 - 1
explorer/base/trace_stream.h

@@ -39,7 +39,7 @@ enum class ProgramPhase {
 
 // Encapsulates the trace stream so that we can cleanly disable tracing while
 // the prelude is being processed. The prelude is expected to take a
-// disproprotionate amount of time to log, so we try to avoid it.
+// disproportionate amount of time to log, so we try to avoid it.
 class TraceStream {
  public:
   explicit TraceStream() = default;

+ 1 - 1
proposals/p0339.md

@@ -292,7 +292,7 @@ In the first statement, `*` is a unary operator and so `T*` is the type and `x`
 is the identifier. However, in the second statement, `*` is a binary operator
 and so `T * x = 3` is the type, and `y` is the identifier; the resulting
 compiler errors may be confusing to users. Furthermore, the place of `3` could
-be taken by an an arbitrarily complex expression; this could cause resolving the
+be taken by an arbitrarily complex expression; this could cause resolving the
 ambiguity between unary and binary `*` to require unbounded look-ahead,
 adversely impacting
 [code compilation time goals](/docs/project/goals.md#fast-and-scalable-development).

+ 1 - 1
proposals/p2760.md

@@ -240,7 +240,7 @@ member for
 
 This makes the part of a class definition that is used in forward declarations
 be exactly the part before the curly braces (`{`...`}`). Before this proposal,
-class forward declarations would exclude the `extends` clause from the the first
+class forward declarations would exclude the `extends` clause from the first
 line of the class definition. This change makes classes consistent with other
 entities that may be forward declared.
 

+ 1 - 1
toolchain/lex/tokenized_buffer.cpp

@@ -198,7 +198,7 @@ auto TokenizedBuffer::PrintWidths::Widen(const PrintWidths& widths) -> void {
 }
 
 // Compute the printed width of a number. When numbers are printed in decimal,
-// the number of digits needed is is one more than the log-base-10 of the
+// the number of digits needed is one more than the log-base-10 of the
 // value. We handle a value of `zero` explicitly.
 //
 // This routine requires its argument to be *non-negative*.

+ 1 - 1
toolchain/parse/handle_expr.cpp

@@ -313,7 +313,7 @@ auto HandleExprLoop(Context& context) -> void {
   }
 }
 
-// Adds the operator node and returns the the main expression loop.
+// Adds the operator node and returns the main expression loop.
 static auto HandleExprLoopForOperator(Context& context,
                                       Context::StateStackEntry state,
                                       NodeKind node_kind) -> void {