Skip to content

Commit 5f9284c

Browse files
authored
Rollup merge of #68562 - hjung4:spell, r=jonas-schievink
Fix spelling errors
2 parents 9188bab + 9a78c2b commit 5f9284c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

src/librustc_ast_lowering/pat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
129129
let mut prev_rest_span = None;
130130

131131
let mut iter = pats.iter();
132-
// Lower all the patterns until the first occurence of a sub-slice pattern.
132+
// Lower all the patterns until the first occurrence of a sub-slice pattern.
133133
for pat in iter.by_ref() {
134134
match pat.kind {
135135
// Found a sub-slice pattern `..`. Record, lower it to `_`, and stop here.

src/librustc_typeck/check/op.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
477477
}
478478

479479
/// If one of the types is an uncalled function and calling it would yield the other type,
480-
/// suggest calling the function. Returns wether a suggestion was given.
480+
/// suggest calling the function. Returns whether a suggestion was given.
481481
fn add_type_neq_err_label(
482482
&self,
483483
err: &mut rustc_errors::DiagnosticBuilder<'_>,

src/libstd/sys/sgx/os.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn errno() -> i32 {
1919

2020
pub fn error_string(errno: i32) -> String {
2121
if errno == RESULT_SUCCESS {
22-
"operation succesful".into()
22+
"operation successful".into()
2323
} else if ((Error::UserRangeStart as _)..=(Error::UserRangeEnd as _)).contains(&errno) {
2424
format!("user-specified error {:08x}", errno)
2525
} else {

src/test/ui/issues/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// However, we did not account for the expected type being different than the tuple pattern type.
1111
// This caused an issue when the tuple pattern type (`P<T>`) was generic.
1212
// Specifically, we tried deriving the 0th field's type using the `substs` of the expected type.
13-
// When attempting to substitute `T`, there was no such substitution, so "out of range" occured.
13+
// When attempting to substitute `T`, there was no such substitution, so "out of range" occurred.
1414

1515
struct U {} // 0 type parameters offered
1616
struct P<T>(T); // 1 type parameter wanted

src/tools/compiletest/src/runtest.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2949,7 +2949,7 @@ impl<'test> TestCx<'test> {
29492949
};
29502950
if run_output_errors > 0 {
29512951
self.fatal_proc_rec(
2952-
&format!("{} errors occured comparing run output.", run_output_errors),
2952+
&format!("{} errors occurred comparing run output.", run_output_errors),
29532953
&proc_res,
29542954
);
29552955
}

0 commit comments

Comments
 (0)