From e00b1a535ae8bb4f4d9cfc16fed526de940ed5b8 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Wed, 6 Apr 2016 03:32:35 -0700 Subject: [PATCH] Stricter error code checking. --- macros/src/error_decorator.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/src/error_decorator.rs b/macros/src/error_decorator.rs index 596637db..7e0d10d2 100644 --- a/macros/src/error_decorator.rs +++ b/macros/src/error_decorator.rs @@ -37,8 +37,8 @@ fn get_error_params(ecx: &mut ExtCtxt, meta_item: &MetaItem) -> Params { } }; - if numeric_code < 100 || numeric_code > 599 { - ecx.span_err(c.v_span, "Error codes must be >= 100 and <= 599."); + if numeric_code < 400 || numeric_code > 599 { + ecx.span_err(c.v_span, "Error codes must be >= 400 and <= 599."); } c.clone().map(|_| { numeric_code })