Don't pass Copy objects by reference.

This commit is contained in:
Dan Gohman
2018-08-28 14:34:11 -07:00
parent 9ada394d11
commit bdd1949b34
2 changed files with 5 additions and 5 deletions

View File

@@ -206,7 +206,7 @@ impl<'a> Context<'a> {
}
// Resolve a reference to a table.
fn check_table(&self, table: Table, loc: &Location) -> ParseResult<()> {
fn check_table(&self, table: Table, loc: Location) -> ParseResult<()> {
if !self.map.contains_table(table) {
err!(loc, "undefined table {}", table)
} else {
@@ -2249,7 +2249,7 @@ impl<'a> Parser<'a> {
}
InstructionFormat::TableAddr => {
let table = self.match_table("expected table identifier")?;
ctx.check_table(table, &self.loc)?;
ctx.check_table(table, self.loc)?;
self.match_token(Token::Comma, "expected ',' between operands")?;
let arg = self.match_value("expected SSA value table address")?;
self.match_token(Token::Comma, "expected ',' between operands")?;