commit
16f3398ff4
@ -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 @@ fn exec_fn_with_args(
|
||||
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();
|
||||
|
@ -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 =
|
||||
|
@ -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>,
|
||||
|
Loading…
Reference in New Issue
Block a user