Always include a position span in rustc_parse_format::Argument

This commit is contained in:
Alex Macleod
2022-07-31 15:11:00 +00:00
parent 482153bc20
commit 2a0b51d852
6 changed files with 96 additions and 41 deletions

View File

@@ -300,7 +300,7 @@ impl<'tcx> OnUnimplementedFormatString {
match token {
Piece::String(_) => (), // Normal string, no need to check it
Piece::NextArgument(a) => match a.position {
Position::ArgumentNamed(s, _) => {
Position::ArgumentNamed(s) => {
match Symbol::intern(s) {
// `{Self}` is allowed
kw::SelfUpper => (),
@@ -386,7 +386,7 @@ impl<'tcx> OnUnimplementedFormatString {
.map(|p| match p {
Piece::String(s) => s,
Piece::NextArgument(a) => match a.position {
Position::ArgumentNamed(s, _) => {
Position::ArgumentNamed(s) => {
let s = Symbol::intern(s);
match generic_map.get(&s) {
Some(val) => val,