Skip to content

Conversation

@dtolnay
Copy link
Member

@dtolnay dtolnay commented Oct 7, 2020

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 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 performance 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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 7, 2020
@yaahc yaahc requested a review from flip1995 October 7, 2020 23:09
@yaahc
Copy link
Member

yaahc commented Oct 7, 2020

lgtm

@bors r+

@bors
Copy link
Contributor

bors commented Oct 7, 2020

📌 Commit 0e159a5 has been approved by yaahc

@bors
Copy link
Contributor

bors commented Oct 7, 2020

⌛ Testing commit 0e159a5 with merge 13a80b3...

@bors
Copy link
Contributor

bors commented Oct 7, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: yaahc
Pushing 13a80b3 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants