about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/allocator.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-10-07 23:10:34 +0000
committerbors <bors@rust-lang.org>2020-10-07 23:10:34 +0000
commit13a80b34baab0576e07eaa986d68a355cb1637a9 (patch)
tree8b35338ac71b4dc3f563319fc6ec1c63b8ff6e6b /compiler/rustc_codegen_llvm/src/allocator.rs
parent277191890b60b28790d2d100191d6bc3d8975920 (diff)
parent0e159a55d66f4c3cd56237f28a36f31599442102 (diff)
downloadrust-13a80b34baab0576e07eaa986d68a355cb1637a9.tar.gz
rust-13a80b34baab0576e07eaa986d68a355cb1637a9.zip
Auto merge of #6128 - dtolnay:rc_buffer, r=yaahc
Downgrade rc_buffer to restriction

I think Arc\<Vec\<T\>\> and Arc\<String\> and similar are a totally reasonable data structure, as observed by others in the comments on [#6044](https://github.com/rust-lang/rust-clippy/pull/6044#event-3799579830) as well. Doing `Arc::make_mut(&mut self.vec).push(...)` or `Arc::make_mut(&mut self.string).push_str("...")` is a terrific and well performing copy-on-write pattern. Linting this with an enabled-by-default <kbd>performance</kbd> lint strikes me as an unacceptable false positive balance.

As of #6090 the documentation of this lint now contains:

> **Known problems:** This pattern can be desirable ...

which should indicate that we shouldn't be linting against correct, reasonable, well-performing patterns with an enabled-by-default lint.

Mentioning #6044, #6090.
r? `@yaahc,` who reviewed the lint.

---

changelog: Remove rc_buffer from default set of enabled lints
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/allocator.rs')
0 files changed, 0 insertions, 0 deletions