mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 19:12:50 +00:00
jsondocck: Better error for invalid @count number
This commit is contained in:
parent
42b548cf9d
commit
dc6b5cb9f3
@ -73,7 +73,10 @@ impl CommandKind {
|
||||
|
||||
if let CommandKind::Count = self {
|
||||
if args[2].parse::<usize>().is_err() {
|
||||
print_err(&format!("Third argument to @count must be a valid usize"), lineno);
|
||||
print_err(
|
||||
&format!("Third argument to @count must be a valid usize (got `{}`)", args[2]),
|
||||
lineno,
|
||||
);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user