about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-07-06 16:13:51 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-07-11 14:04:42 +1000
commit277bc9641d5585fcb2d94440efc6b1880a74fd64 (patch)
treed1413452a67b2f087f899689f4bf2299a08031fe /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentf314ece27503a7518b91b011ba74709914204913 (diff)
downloadrust-277bc9641d5585fcb2d94440efc6b1880a74fd64.tar.gz
rust-277bc9641d5585fcb2d94440efc6b1880a74fd64.zip
Remove unnecessary sigils and `ref`s in derived code.
E.g. improving code like this:
```
match &*self {
    &Enum1::Single { x: ref __self_0 } => {
        ::core::hash::Hash::hash(&*__self_0, state)
    }
}
```
to this:
```
match self {
    Enum1::Single { x: __self_0 } => {
        ::core::hash::Hash::hash(&*__self_0, state)
    }
}
```
by removing the `&*`, the `&`, and the `ref`.

I suspect the current generated code predates deref-coercion.

The commit also gets rid of `use_temporaries`, instead passing around
`always_copy`, which makes things a little clearer. And it fixes up some
comments.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions