Fix off by one error and add ui test.
This commit is contained in:
@@ -485,7 +485,7 @@ impl<'a, 'b> Context<'a, 'b> {
|
||||
if let Some(span) = fmt.width_span {
|
||||
let span = self.fmtsp.from_inner(InnerSpan::new(span.start, span.end));
|
||||
match fmt.width {
|
||||
parse::CountIsParam(pos) if pos > self.num_args() => {
|
||||
parse::CountIsParam(pos) if pos >= self.num_args() => {
|
||||
e.span_label(
|
||||
span,
|
||||
&format!(
|
||||
|
||||
Reference in New Issue
Block a user