about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-02 17:17:30 +0200
committerGitHub <noreply@github.com>2022-08-02 17:17:30 +0200
commita0991b8ba8ec5746af36c4912fd8895e33cf5fca (patch)
tree2291e971171bbe26a72fa758510b9860f927826d /compiler/rustc_trait_selection/src
parent792bc5a0102d0973d42183a2b267850bb905236f (diff)
parent2a0b51d852e3765d257284f91fc3246084c96ee5 (diff)
downloadrust-a0991b8ba8ec5746af36c4912fd8895e33cf5fca.tar.gz
rust-a0991b8ba8ec5746af36c4912fd8895e33cf5fca.zip
Rollup merge of #99987 - Alexendoo:parse-format-position-span, r=fee1-dead
Always include a position span in `rustc_parse_format::Argument`

Moves the spans from the `Position` enum to always be included in the `Argument` struct. Doesn't make any changes to use it in rustc, but it will be useful for some upcoming Clippy lints
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/on_unimplemented.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/on_unimplemented.rs b/compiler/rustc_trait_selection/src/traits/on_unimplemented.rs
index 4d3b0b4cf07..9227bbf011d 100644
--- a/compiler/rustc_trait_selection/src/traits/on_unimplemented.rs
+++ b/compiler/rustc_trait_selection/src/traits/on_unimplemented.rs
@@ -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,