Fix off by one error and add ui test.
This commit is contained in:
parent
62187b12c2
commit
f8dfc4bf35
3 changed files with 17 additions and 3 deletions
|
@ -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!(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue