about summary refs log tree commit diff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorChayim Refael Friedman <chayimfr@gmail.com>2024-08-29 00:10:26 +0300
committerChayim Refael Friedman <chayimfr@gmail.com>2024-08-29 00:10:26 +0300
commitfe5f91ed8e54eeac1cc81930982d01483d745a65 (patch)
tree3efa56d8782a28f0b508c4b85fb089882e5744e7 /tests/rustdoc-js-std/parser-errors.js
parent2a7ec0b0ad0b9d7aea147694c23b5f52b6dc6fa9 (diff)
downloadrust-fe5f91ed8e54eeac1cc81930982d01483d745a65.tar.gz
rust-fe5f91ed8e54eeac1cc81930982d01483d745a65.zip
Don't add reference when it isn't needed for the "Extract variable" assist
I.e. don't generate `let var_name = &foo()`.

Anything that creates a new value don't need a reference. That excludes mostly field accesses and indexing.

I had a thought that we can also not generate a reference for fields and indexing as long as the type is `Copy`, but sometimes people impl `Copy` even when they don't want to copy the values (e.g. a large type), so I didn't do that.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions