Skip to content

Commit 6ed4f15

Browse files
committed
RefCell::get_mut: fix typo
and fix the same typo in a bunch of other places
1 parent a78c9be commit 6ed4f15

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

library/core/src/cell.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ impl<T: ?Sized> RefCell<T> {
10251025
///
10261026
/// Since this method borrows `RefCell` mutably, it is statically guaranteed
10271027
/// that no borrows to the underlying data exist. The dynamic checks inherent
1028-
/// in [`borrow_mut`] and most other methods of `RefCell` are therefor
1028+
/// in [`borrow_mut`] and most other methods of `RefCell` are therefore
10291029
/// unnecessary.
10301030
///
10311031
/// This method can only be called if `RefCell` can be mutably borrowed,

src/tools/clippy/clippy_dev/src/setup/git_hook.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use super::verify_inside_clippy_dir;
66
/// Rusts setup uses `git rev-parse --git-common-dir` to get the root directory of the repo.
77
/// I've decided against this for the sake of simplicity and to make sure that it doesn't install
88
/// the hook if `clippy_dev` would be used in the rust tree. The hook also references this tool
9-
/// for formatting and should therefor only be used in a normal clone of clippy
9+
/// for formatting and should therefore only be used in a normal clone of clippy
1010
const REPO_GIT_DIR: &str = ".git";
1111
const HOOK_SOURCE_FILE: &str = "util/etc/pre-commit.sh";
1212
const HOOK_TARGET_FILE: &str = ".git/hooks/pre-commit";

src/tools/clippy/clippy_utils/src/hir_utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl HirEqInterExpr<'_, '_, '_> {
113113
}
114114
}
115115

116-
// eq_pat adds the HirIds to the locals map. We therefor call it last to make sure that
116+
// eq_pat adds the HirIds to the locals map. We therefore call it last to make sure that
117117
// these only get added if the init and type is equal.
118118
both(&l.init, &r.init, |l, r| self.eq_expr(l, r))
119119
&& both(&l.ty, &r.ty, |l, r| self.eq_ty(l, r))

src/tools/rust-analyzer/crates/flycheck/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ impl FlycheckActor {
362362
/// A handle to a cargo process used for fly-checking.
363363
struct CargoHandle {
364364
/// The handle to the actual cargo process. As we cannot cancel directly from with
365-
/// a read syscall dropping and therefor terminating the process is our best option.
365+
/// a read syscall dropping and therefore terminating the process is our best option.
366366
child: JodChild,
367367
thread: jod_thread::JoinHandle<io::Result<(bool, String)>>,
368368
receiver: Receiver<CargoMessage>,

src/tools/rust-analyzer/crates/hir-expand/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ impl<'a> InFile<&'a SyntaxNode> {
814814

815815
pub fn original_syntax_node(self, db: &dyn db::AstDatabase) -> Option<InFile<SyntaxNode>> {
816816
// This kind of upmapping can only be achieved in attribute expanded files,
817-
// as we don't have node inputs otherwise and therefor can't find an `N` node in the input
817+
// as we don't have node inputs otherwise and therefore can't find an `N` node in the input
818818
if !self.file_id.is_macro() {
819819
return Some(self.map(Clone::clone));
820820
} else if !self.file_id.is_attr_macro(db) {
@@ -926,7 +926,7 @@ impl<N: AstNode> InFile<N> {
926926

927927
pub fn original_ast_node(self, db: &dyn db::AstDatabase) -> Option<InFile<N>> {
928928
// This kind of upmapping can only be achieved in attribute expanded files,
929-
// as we don't have node inputs otherwise and therefor can't find an `N` node in the input
929+
// as we don't have node inputs otherwise and therefore can't find an `N` node in the input
930930
if !self.file_id.is_macro() {
931931
return Some(self);
932932
} else if !self.file_id.is_attr_macro(db) {

src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ config_data! {
157157
checkOnSave_noDefaultFeatures: Option<bool> = "null",
158158
/// Override the command rust-analyzer uses instead of `cargo check` for
159159
/// diagnostics on save. The command is required to output json and
160-
/// should therefor include `--message-format=json` or a similar option.
160+
/// should therefore include `--message-format=json` or a similar option.
161161
///
162162
/// If you're changing this because you're using some tool wrapping
163163
/// Cargo, you might also want to change

src/tools/rust-analyzer/crates/syntax/src/tests/sourcegen_ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: &AstSrc) -> String {
8686
.traits
8787
.iter()
8888
.filter(|trait_name| {
89-
// Loops have two expressions so this might collide, therefor manual impl it
89+
// Loops have two expressions so this might collide, therefore manual impl it
9090
node.name != "ForExpr" && node.name != "WhileExpr"
9191
|| trait_name.as_str() != "HasLoopBody"
9292
})

0 commit comments

Comments
 (0)