mirror of https://github.com/rwf2/Rocket.git
Stricter error code checking.
This commit is contained in:
parent
dc5ef6a421
commit
e00b1a535a
|
@ -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 })
|
||||
|
|
Loading…
Reference in New Issue