Skip to content

Commit

Permalink
Auto merge of #15812 - cuishuang:master, r=lnicola
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
bors committed Oct 30, 2023
2 parents f493207 + 9c99afe commit 16f3398
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/hir-ty/src/mir/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion crates/rust-analyzer/src/handlers/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
4 changes: 2 additions & 2 deletions crates/syntax/src/tests/sourcegen_ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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>,
Expand Down

0 comments on commit 16f3398

Please sign in to comment.