Improve format string errors
- Point at format string position inside the formatting string - Explain that argument names can't start with an underscore
This commit is contained in:
parent
e5f80f2a4f
commit
3f6b3bbace
5 changed files with 132 additions and 21 deletions
|
@ -427,6 +427,13 @@ impl Span {
|
|||
)
|
||||
}
|
||||
|
||||
pub fn from_inner_byte_pos(self, start: usize, end: usize) -> Span {
|
||||
let span = self.data();
|
||||
Span::new(span.lo + BytePos::from_usize(start),
|
||||
span.lo + BytePos::from_usize(end),
|
||||
span.ctxt)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn apply_mark(self, mark: Mark) -> Span {
|
||||
let span = self.data();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue