Skip to content

Commit 16f3398

Browse files
committed
Auto merge of rust-lang#15812 - cuishuang:master, r=lnicola
Fix some typos
2 parents f493207 + 9c99afe commit 16f3398

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

crates/hir-ty/src/mir/eval.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ pub struct Evaluator<'a> {
162162
not_special_fn_cache: RefCell<FxHashSet<FunctionId>>,
163163
mir_or_dyn_index_cache: RefCell<FxHashMap<(FunctionId, Substitution), MirOrDynIndex>>,
164164
/// Constantly dropping and creating `Locals` is very costly. We store
165-
/// old locals that we normaly want to drop here, to reuse their allocations
165+
/// old locals that we normally want to drop here, to reuse their allocations
166166
/// later.
167167
unused_locals_store: RefCell<FxHashMap<DefWithBodyId, Vec<Locals>>>,
168168
cached_ptr_size: usize,
@@ -2299,7 +2299,7 @@ impl Evaluator<'_> {
22992299
match self.get_mir_or_dyn_index(def, generic_args.clone(), locals, span)? {
23002300
MirOrDynIndex::Dyn(self_ty_idx) => {
23012301
// In the layout of current possible receiver, which at the moment of writing this code is one of
2302-
// `&T`, `&mut T`, `Box<T>`, `Rc<T>`, `Arc<T>`, and `Pin<P>` where `P` is one of possible recievers,
2302+
// `&T`, `&mut T`, `Box<T>`, `Rc<T>`, `Arc<T>`, and `Pin<P>` where `P` is one of possible receivers,
23032303
// the vtable is exactly in the `[ptr_size..2*ptr_size]` bytes. So we can use it without branching on
23042304
// the type.
23052305
let first_arg = arg_bytes.clone().next().unwrap();

crates/rust-analyzer/src/handlers/request.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ fn run_rustfmt(
20002000
let workspace = CargoTargetSpec::for_file(&snap, file_id)?;
20012001
let mut cmd = match workspace {
20022002
Some(spec) => {
2003-
// approach: if the command name contains a path seperator, join it with the workspace root.
2003+
// approach: if the command name contains a path separator, join it with the workspace root.
20042004
// however, if the path is absolute, joining will result in the absolute path being preserved.
20052005
// as a fallback, rely on $PATH-based discovery.
20062006
let cmd_path =

crates/syntax/src/tests/sourcegen_ast.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -623,7 +623,7 @@ fn lower_enum(grammar: &Grammar, rule: &Rule) -> Option<Vec<String>> {
623623
}
624624

625625
fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, rule: &Rule) {
626-
if lower_seperated_list(acc, grammar, label, rule) {
626+
if lower_separated_list(acc, grammar, label, rule) {
627627
return;
628628
}
629629

@@ -689,7 +689,7 @@ fn lower_rule(acc: &mut Vec<Field>, grammar: &Grammar, label: Option<&String>, r
689689
}
690690

691691
// (T (',' T)* ','?)
692-
fn lower_seperated_list(
692+
fn lower_separated_list(
693693
acc: &mut Vec<Field>,
694694
grammar: &Grammar,
695695
label: Option<&String>,

0 commit comments

Comments
 (0)