diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-08-25 14:05:01 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2022-09-02 07:26:22 +1000 |
| commit | bd1e6836a07fa7b96b41effc3ec90e60aaa494df (patch) | |
| tree | 550f41080a5e88fd8dc83261aa9c5b1c0721e10e /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 053874eecc9806f36195c35a7fad9c8878b0788e (diff) | |
| download | rust-bd1e6836a07fa7b96b41effc3ec90e60aaa494df.tar.gz rust-bd1e6836a07fa7b96b41effc3ec90e60aaa494df.zip | |
Avoid some clones.
`Builder::expr_into_pattern` has a single call site. Currently the `pattern` argument at the call site is always cloned. This commit changes things so that we instead do a clone within `expr_into_pattern`, but only if the pattern has the `PatKind::AscribeUserType` kind, and we only clone the annotation within the pattern instead of the entire pattern.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
