Fix cases of conflicting two-phase borrows

This commit is contained in:
Matthew Jasper
2019-02-27 20:32:12 +00:00
parent 2d065712cf
commit 7eda723279
3 changed files with 7 additions and 6 deletions

View File

@@ -347,9 +347,9 @@ impl<'a, 'b> Context<'a, 'b> {
Named(name) => {
match self.names.get(&name) {
Some(idx) => {
Some(&idx) => {
// Treat as positional arg.
self.verify_arg_type(Exact(*idx), ty)
self.verify_arg_type(Exact(idx), ty)
}
None => {
let msg = format!("there is no argument named `{}`", name);