Skip to content

Commit dce5e29

Browse files
authored
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
Fix some typos in code comments.
2 parents 865d83e + 33ebe04 commit dce5e29

File tree

1 file changed

+9
-9
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+9
-9
lines changed

compiler/rustc_codegen_ssa/src/back/write.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
10981098
// There are a few environmental pre-conditions that shape how the system
10991099
// is set up:
11001100
//
1101-
// - Error reporting only can happen on the main thread because that's the
1101+
// - Error reporting can only happen on the main thread because that's the
11021102
// only place where we have access to the compiler `Session`.
11031103
// - LLVM work can be done on any thread.
11041104
// - Codegen can only happen on the main thread.
@@ -1110,16 +1110,16 @@ fn start_executing_work<B: ExtraBackendMethods>(
11101110
// Error Reporting
11111111
// ===============
11121112
// The error reporting restriction is handled separately from the rest: We
1113-
// set up a `SharedEmitter` the holds an open channel to the main thread.
1113+
// set up a `SharedEmitter` that holds an open channel to the main thread.
11141114
// When an error occurs on any thread, the shared emitter will send the
11151115
// error message to the receiver main thread (`SharedEmitterMain`). The
11161116
// main thread will periodically query this error message queue and emit
11171117
// any error messages it has received. It might even abort compilation if
1118-
// has received a fatal error. In this case we rely on all other threads
1118+
// it has received a fatal error. In this case we rely on all other threads
11191119
// being torn down automatically with the main thread.
11201120
// Since the main thread will often be busy doing codegen work, error
11211121
// reporting will be somewhat delayed, since the message queue can only be
1122-
// checked in between to work packages.
1122+
// checked in between two work packages.
11231123
//
11241124
// Work Processing Infrastructure
11251125
// ==============================
@@ -1133,7 +1133,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
11331133
// thread about what work to do when, and it will spawn off LLVM worker
11341134
// threads as open LLVM WorkItems become available.
11351135
//
1136-
// The job of the main thread is to codegen CGUs into LLVM work package
1136+
// The job of the main thread is to codegen CGUs into LLVM work packages
11371137
// (since the main thread is the only thread that can do this). The main
11381138
// thread will block until it receives a message from the coordinator, upon
11391139
// which it will codegen one CGU, send it to the coordinator and block
@@ -1142,10 +1142,10 @@ fn start_executing_work<B: ExtraBackendMethods>(
11421142
//
11431143
// The coordinator keeps a queue of LLVM WorkItems, and when a `Token` is
11441144
// available, it will spawn off a new LLVM worker thread and let it process
1145-
// that a WorkItem. When a LLVM worker thread is done with its WorkItem,
1145+
// a WorkItem. When a LLVM worker thread is done with its WorkItem,
11461146
// it will just shut down, which also frees all resources associated with
11471147
// the given LLVM module, and sends a message to the coordinator that the
1148-
// has been completed.
1148+
// WorkItem has been completed.
11491149
//
11501150
// Work Scheduling
11511151
// ===============
@@ -1165,7 +1165,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
11651165
//
11661166
// Doing LLVM Work on the Main Thread
11671167
// ----------------------------------
1168-
// Since the main thread owns the compiler processes implicit `Token`, it is
1168+
// Since the main thread owns the compiler process's implicit `Token`, it is
11691169
// wasteful to keep it blocked without doing any work. Therefore, what we do
11701170
// in this case is: We spawn off an additional LLVM worker thread that helps
11711171
// reduce the queue. The work it is doing corresponds to the implicit
@@ -1216,7 +1216,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
12161216
// ------------------------------
12171217
//
12181218
// The final job the coordinator thread is responsible for is managing LTO
1219-
// and how that works. When LTO is requested what we'll to is collect all
1219+
// and how that works. When LTO is requested what we'll do is collect all
12201220
// optimized LLVM modules into a local vector on the coordinator. Once all
12211221
// modules have been codegened and optimized we hand this to the `lto`
12221222
// module for further optimization. The `lto` module will return back a list

0 commit comments

Comments
 (0)