]> git.lizzy.rs Git - rust.git/commit
Use field span in `rustc_macros` when emitting decode call
authorAaron Hill <aa1ronham@gmail.com>
Thu, 16 Dec 2021 23:35:15 +0000 (18:35 -0500)
committerAaron Hill <aa1ronham@gmail.com>
Thu, 16 Dec 2021 23:35:15 +0000 (18:35 -0500)
commit44fdb98764e13faecbe2c307798bbe97348bddde
tree4c3fa0f912950bb696db5d92f54f65a8fe0e0dfe
parent5531927e8af9b99ad923af4c827c91038bca51ee
Use field span in `rustc_macros` when emitting decode call

This will cause backtraces to point to the location of
the field in the struct/enum, rather than the derive macro.

This makes it clear which field was being decoded when the
backtrace was captured (which is especially useful if
there are multiple fields with the same type).
compiler/rustc_macros/src/serialize.rs