about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-09-11 07:11:01 +0000
committerbors <bors@rust-lang.org>2021-09-11 07:11:01 +0000
commit4e880f8cbc191374ce7db335962489f41d6d4e3e (patch)
treef25dad5a8356801beab8d2628bc9d6f613625976 /compiler/rustc_query_impl/src
parent22719efcc570b043f2e519d6025e5f36eab38fe2 (diff)
parent543e601a9d5e0efbb3fff803a0427efcceb0fef1 (diff)
downloadrust-4e880f8cbc191374ce7db335962489f41d6d4e3e.tar.gz
rust-4e880f8cbc191374ce7db335962489f41d6d4e3e.zip
Auto merge of #88214 - notriddle:notriddle/for-loop-span-drop-temps-mut, r=nagisa
rustc: use more correct span data in for loop desugaring

Fixes #82462

Before:

      help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
         |
      LL |     for x in DroppingSlice(&*v).iter(); {
         |                                       +

After:

      help: consider adding semicolon after the expression so its temporaries are dropped sooner, before the local variables declared by the block are dropped
         |
      LL |     };
         |      +

This seems like a reasonable fix: since the desugared "expr_drop_temps_mut" contains the entire desugared loop construct, its span should contain the entire loop construct as well.
Diffstat (limited to 'compiler/rustc_query_impl/src')
0 files changed, 0 insertions, 0 deletions