about summary refs log tree commit diff
diff options
context:
space:
mode:
authorcomet <hjung524@gmail.com>2020-01-26 22:52:13 -0600
committercomet <hjung524@gmail.com>2020-01-26 22:52:13 -0600
commit9a78c2b11d50fc1ed60c92eec7cb59ae74516e89 (patch)
tree5550ab96ce8c15169c3e875722258b21e19b2850
parentc3681d62ee4bb849e87a2ec5d663afc34ac05d85 (diff)
downloadrust-9a78c2b11d50fc1ed60c92eec7cb59ae74516e89.tar.gz
rust-9a78c2b11d50fc1ed60c92eec7cb59ae74516e89.zip
update
-rw-r--r--src/librustc_ast_lowering/pat.rs2
-rw-r--r--src/librustc_typeck/check/op.rs2
-rw-r--r--src/libstd/sys/sgx/os.rs2
-rw-r--r--src/test/ui/issues/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs2
-rw-r--r--src/tools/compiletest/src/runtest.rs2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_ast_lowering/pat.rs b/src/librustc_ast_lowering/pat.rs
index 6cf640a0e98..4c3c4ddac78 100644
--- a/src/librustc_ast_lowering/pat.rs
+++ b/src/librustc_ast_lowering/pat.rs
@@ -129,7 +129,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
         let mut prev_rest_span = None;
 
         let mut iter = pats.iter();
-        // Lower all the patterns until the first occurence of a sub-slice pattern.
+        // Lower all the patterns until the first occurrence of a sub-slice pattern.
         for pat in iter.by_ref() {
             match pat.kind {
                 // Found a sub-slice pattern `..`. Record, lower it to `_`, and stop here.
diff --git a/src/librustc_typeck/check/op.rs b/src/librustc_typeck/check/op.rs
index 91e1731ac45..1ab8f05db12 100644
--- a/src/librustc_typeck/check/op.rs
+++ b/src/librustc_typeck/check/op.rs
@@ -477,7 +477,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
     }
 
     /// If one of the types is an uncalled function and calling it would yield the other type,
-    /// suggest calling the function. Returns wether a suggestion was given.
+    /// suggest calling the function. Returns whether a suggestion was given.
     fn add_type_neq_err_label(
         &self,
         err: &mut rustc_errors::DiagnosticBuilder<'_>,
diff --git a/src/libstd/sys/sgx/os.rs b/src/libstd/sys/sgx/os.rs
index 6ed7a2f2044..56fc84b4a3f 100644
--- a/src/libstd/sys/sgx/os.rs
+++ b/src/libstd/sys/sgx/os.rs
@@ -19,7 +19,7 @@ pub fn errno() -> i32 {
 
 pub fn error_string(errno: i32) -> String {
     if errno == RESULT_SUCCESS {
-        "operation succesful".into()
+        "operation successful".into()
     } else if ((Error::UserRangeStart as _)..=(Error::UserRangeEnd as _)).contains(&errno) {
         format!("user-specified error {:08x}", errno)
     } else {
diff --git a/src/test/ui/issues/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs b/src/test/ui/issues/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs
index 44bd645598a..a3023ee906d 100644
--- a/src/test/ui/issues/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs
+++ b/src/test/ui/issues/issue-67037-pat-tup-scrut-ty-diff-less-fields.rs
@@ -10,7 +10,7 @@
 // However, we did not account for the expected type being different than the tuple pattern type.
 // This caused an issue when the tuple pattern type (`P<T>`) was generic.
 // Specifically, we tried deriving the 0th field's type using the `substs` of the expected type.
-// When attempting to substitute `T`, there was no such substitution, so "out of range" occured.
+// When attempting to substitute `T`, there was no such substitution, so "out of range" occurred.
 
 struct U {} // 0 type parameters offered
 struct P<T>(T); // 1 type parameter wanted
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index d1ee60d74e7..be66c9ab2db 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2949,7 +2949,7 @@ impl<'test> TestCx<'test> {
             };
             if run_output_errors > 0 {
                 self.fatal_proc_rec(
-                    &format!("{} errors occured comparing run output.", run_output_errors),
+                    &format!("{} errors occurred comparing run output.", run_output_errors),
                     &proc_res,
                 );
             }