about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/errors.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2022-08-25 14:05:01 +1000
committerNicholas Nethercote <n.nethercote@gmail.com>2022-09-02 07:26:22 +1000
commitbd1e6836a07fa7b96b41effc3ec90e60aaa494df (patch)
tree550f41080a5e88fd8dc83261aa9c5b1c0721e10e /compiler/rustc_codegen_llvm/src/errors.rs
parent053874eecc9806f36195c35a7fad9c8878b0788e (diff)
downloadrust-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