Closed
Description
See comment at: https://github.com/mozilla/rust/blob/3d1f3f4de087ccf7e30b795fbd73e054b4761c4f/src/librustc/middle/trans/debuginfo.rs#L423
The llvm.dbg.declare
intrinsic used to describe local variables and arguments always expects an alloca as argument. For by-value self arguments, this is not always the case. See trans::base::copy_args_to_allocas()
: https://github.com/mozilla/rust/blob/c0b7972f7d63e4b55098797cb48949b00d3ffee7/src/librustc/middle/trans/base.rs#L1785
For other kinds of arguments, the value is always copied out into local allocas when debug info is enabled. Something like this has should be done for by-value self arguments too.