diff options
| author | bors <bors@rust-lang.org> | 2023-10-30 06:48:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-10-30 06:48:55 +0000 |
| commit | 16f3398ff47ef638d252edd042ff6135af650d9a (patch) | |
| tree | 3f858546f71a76a544cfe88d002c5fe57026af2d | |
| parent | f493207744da98b31295b02e6ed95b26a927056c (diff) | |
| parent | 9c99afe3aa4bbab8da3d69fef66b399cb8c15304 (diff) | |
| download | rust-16f3398ff47ef638d252edd042ff6135af650d9a.tar.gz rust-16f3398ff47ef638d252edd042ff6135af650d9a.zip | |
Auto merge of #15812 - cuishuang:master, r=lnicola
Fix some typos
| -rw-r--r-- | crates/hir-ty/src/mir/eval.rs | 4 | ||||
| -rw-r--r-- | crates/rust-analyzer/src/handlers/request.rs | 2 | ||||
| -rw-r--r-- | crates/syntax/src/tests/sourcegen_ast.rs | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/crates/hir-ty/src/mir/eval.rs b/crates/hir-ty/src/mir/eval.rs index 7823c320341..62efb858511 100644 --- a/crates/hir-ty/src/mir/eval.rs +++ b/crates/hir-ty/src/mir/eval.rs @@ -162,7 +162,7 @@ pub struct Evaluator<'a> { not_special_fn_cache: RefCell<FxHashSet<FunctionId>>, mir_or_dyn_index_cache: RefCell<FxHashMap<(FunctionId, Substitution), MirOrDynIndex>>, /// Constantly dropping and creating `Locals` is very costly. We store - /// old locals that we normaly want to drop here, to reuse their allocations + /// old locals that we normally want to drop here, to reuse their allocations /// later. unused_locals_store: RefCell<FxHashMap<DefWithBodyId, Vec<Locals>>>, cached_ptr_size: usize, @@ -2299,7 +2299,7 @@ impl Evaluator<'_> { match self.get_mir_or_dyn_index(def, generic_args.clone(), locals, span)? { MirOrDynIndex::Dyn(self_ty_idx) => { // In the layout of current possible receiver, which at the moment of writing this code is one of - // `&T`, `&mut T`, `Box<T>`, `Rc<T>`, `Arc<T>`, and `Pin<P>` where `P` is one of possible recievers, + // `&T`, `&mut T`, `Box<T>`, `Rc<T>`, `Arc<T>`, and `Pin<P>` where `P` is one of possible receivers, // the vtable is exactly in the `[ptr_size..2*ptr_size]` bytes. So we can use it without branching on // the type. let first_arg = arg_bytes.clone().next().unwrap(); diff --git a/crates/rust-analyzer/src/handlers/request.rs b/crates/rust-analyzer/src/handlers/request.rs index 6c2f1ec3fed..06c27332d44 100644 --- a/crates/rust-analyzer/src/handlers/request.rs +++ b/crates/rust-analyzer/src/handlers/request.rs @@ -2000,7 +2000,7 @@ fn run_rustfmt( let workspace = CargoTargetSpec::for_file(&snap, file_id)?; let mut cmd = match workspace { Some(spec) => { - // approach: if the command name contains a path seperator, join it with the workspace root. + // approach: if the command name contains a path separator, join it with the workspace root. // however, if the path is absolute, joining will result in the absolute path being preserved. // as a fallback, rely on $PATH-based discovery. let cmd_path = diff --git a/crates/syntax/src/tests/sourcegen_ast.rs b/crates/syntax/src/tests/sourcegen_ast.rs index 56227fce9b5..74798952a3f 100644 --- a/crates/syntax/src/tests/sourcegen_ast.rs +++ b/crates/syntax/src/tests/sourcegen_ast.rs @@ -623,7 +623,7 @@ fn lower_enum(grammar: &Grammar, rule: &Rule) -> Option<Vec<String>> { } fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, rule: &Rule) { - if lower_seperated_list(acc, grammar, label, rule) { + if lower_separated_list(acc, grammar, label, rule) { return; } @@ -689,7 +689,7 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, r } // (T (',' T)* ','?) -fn lower_seperated_list( +fn lower_separated_list( acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, |
