From 169a57ee8d301c44fb285cc95fc1309d96aa37ab Mon Sep 17 00:00:00 2001 From: Virgile Andreani Date: Sun, 4 May 2014 20:48:16 +0200 Subject: Remove two useless comparisons according to the updated type_limits lint. --- src/libsyntax/ext/format.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libsyntax') diff --git a/src/libsyntax/ext/format.rs b/src/libsyntax/ext/format.rs index df79b105444..0d856fb689d 100644 --- a/src/libsyntax/ext/format.rs +++ b/src/libsyntax/ext/format.rs @@ -268,7 +268,7 @@ impl<'a, 'b> Context<'a, 'b> { fn verify_arg_type(&mut self, arg: Position, ty: ArgumentType) { match arg { Exact(arg) => { - if arg < 0 || self.args.len() <= arg { + if self.args.len() <= arg { let msg = format!("invalid reference to argument `{}` (there \ are {} arguments)", arg, self.args.len()); self.ecx.span_err(self.fmtsp, msg); -- cgit 1.4.1-3-g733a5