about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2021-08-21 12:51:34 -0700
committerMichael Howell <michael@notriddle.com>2021-08-28 12:18:46 -0700
commitfe1a7f71fbf3cf845a09a9b333a6adcf7e839607 (patch)
tree5b43977dd3f95093d053e1b069541852bfc46dfd /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent9583fd1bdd0127328e25e5b8c24dff575ec2c86b (diff)
downloadrust-fe1a7f71fbf3cf845a09a9b333a6adcf7e839607.tar.gz
rust-fe1a7f71fbf3cf845a09a9b333a6adcf7e839607.zip
rustc: use more correct span data in for loop desugaring
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/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions