We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8239a37 commit a6c7ad7Copy full SHA for a6c7ad7
compiler/rustc_parse_format/src/lib.rs
@@ -696,8 +696,16 @@ impl<'a> Parser<'a> {
696
} else {
697
spec.precision = self.count(start + 1);
698
}
699
- let end = self.current_pos();
700
- spec.precision_span = Some(self.span(start, end));
+ if spec.precision == CountImplied {
+ self.err(
701
+ "expected numerical precision",
702
+ "missing precision",
703
+ self.span(start, end),
704
+ );
705
+ } else {
706
+ let end = self.current_pos();
707
+ spec.precision_span = Some(self.span(start, end));
708
+ }
709
710
711
let ty_span_start = self.current_pos();
0 commit comments