about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
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
commiteac0b26015ac0e4f8f025e82b3568ab5a85c2746 (patch)
treedf11a6aa754a5a8ce04fe0a6dae628a9ec7f4f78 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent81ce2fb1678aa6e5508bd1700d2d6f3e436340bb (diff)
parent48268f523776f32a321c37a1464a2a6512e357b0 (diff)
downloadrust-eac0b26015ac0e4f8f025e82b3568ab5a85c2746.tar.gz
rust-eac0b26015ac0e4f8f025e82b3568ab5a85c2746.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_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions