fix extra ampersands

This commit is contained in:
Folkert 2021-07-29 17:32:08 +02:00
parent b6116eeb98
commit 899cbeabd7
79 changed files with 372 additions and 376 deletions

View file

@ -56,10 +56,10 @@ pub fn make_solved_types(
for loc_named_var in alias.type_variables.iter() {
let (name, var) = &loc_named_var.value;
args.push((name.clone(), SolvedType::new(&solved_subs, *var)));
args.push((name.clone(), SolvedType::new(solved_subs, *var)));
}
let solved_type = SolvedType::from_type(&solved_subs, &alias.typ);
let solved_type = SolvedType::from_type(solved_subs, &alias.typ);
let solved_alias = SolvedType::Alias(*symbol, args, Box::new(solved_type));
solved_types.insert(*symbol, solved_alias);
@ -71,7 +71,7 @@ pub fn make_solved_types(
// other modules will generate constraints for imported values
// within the context of their own Subs.
for (symbol, var) in exposed_vars_by_symbol.iter() {
let solved_type = SolvedType::new(&solved_subs, *var);
let solved_type = SolvedType::new(solved_subs, *var);
solved_types.insert(*symbol, solved_type);
}

View file

@ -257,7 +257,7 @@ fn solve(
}
}
Lookup(symbol, expectation, region) => {
match env.vars_by_symbol.get(&symbol) {
match env.vars_by_symbol.get(symbol) {
Some(var) => {
// Deep copy the vars associated with this symbol before unifying them.
// Otherwise, suppose we have this:
@ -390,7 +390,7 @@ fn solve(
// If the return expression is guaranteed to solve,
// solve the assignments themselves and move on.
solve(
&env,
env,
state,
rank,
pools,
@ -508,7 +508,7 @@ fn solve(
env: saved_env,
mark,
} = solve(
&env,
env,
state,
next_rank,
next_pools,
@ -577,7 +577,7 @@ fn solve(
let mut new_env = env.clone();
for (symbol, loc_var) in local_def_vars.iter() {
// when there are duplicates, keep the one from `env`
if !new_env.vars_by_symbol.contains_key(&symbol) {
if !new_env.vars_by_symbol.contains_key(symbol) {
new_env.vars_by_symbol.insert(*symbol, loc_var.value);
}
}
@ -599,7 +599,7 @@ fn solve(
problems,
cached_aliases,
subs,
&ret_con,
ret_con,
);
for (symbol, loc_var) in local_def_vars {
@ -1004,7 +1004,7 @@ fn adjust_rank(
unsafe { &*ptr }
};
let max_rank = adjust_rank_content(subs, young_mark, visit_mark, group_rank, &content);
let max_rank = adjust_rank_content(subs, young_mark, visit_mark, group_rank, content);
subs.set_rank_mark(var, max_rank, visit_mark);