Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix spelling errors #68562

Merged
merged 1 commit into from Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/librustc_ast_lowering/pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_typeck/check/op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<'_>,
Expand Down
2 changes: 1 addition & 1 deletion src/libstd/sys/sgx/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/runtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);
}
Expand Down