From e51cc089da7f5a067d348ee48f494c5bca662f95 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Mon, 10 Nov 2014 00:11:28 +1100 Subject: Move checked arithmetic operators into Int trait --- src/libsyntax/parse/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax/parse/mod.rs') diff --git a/src/libsyntax/parse/mod.rs b/src/libsyntax/parse/mod.rs index 996708b2174..0f364d1ba0b 100644 --- a/src/libsyntax/parse/mod.rs +++ b/src/libsyntax/parse/mod.rs @@ -63,7 +63,7 @@ impl ParseSess { pub fn reserve_node_ids(&self, count: ast::NodeId) -> ast::NodeId { let v = self.node_id.get(); - match v.checked_add(&count) { + match v.checked_add(count) { Some(next) => { self.node_id.set(next); } None => panic!("Input too large, ran out of node ids!") } -- cgit 1.4.1-3-g733a5