Skip to content

Conversation

@llogiq
Copy link
Contributor

@llogiq llogiq commented Jan 5, 2025

Closes #13697.


changelog: add [owned_cow] lint

@rustbot
Copy link
Collaborator

rustbot commented Jan 5, 2025

r? @y21

rustbot has assigned @y21.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jan 5, 2025
@llogiq llogiq force-pushed the too-owned branch 5 times, most recently from e442270 to 3f8fe08 Compare January 5, 2025 13:15
///
/// ### Example
/// ```no_run
/// let wrogn: std::borrow::Cow<'_, String>;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 ___________________
< looks like a typo >
 -------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a deliberate misspelling. Spelling "wrong" wrongly is a humourous way of normalizing making errors, learning from them and fixing them.

@samueltardieu
Copy link
Member

The hits on darling_core look like a FP, as it suggests changing Cow<'a, str> with &'a str in a public struct field definition.

@llogiq
Copy link
Contributor Author

llogiq commented Jan 5, 2025

@samueltardieu for me, it suggests replacing the String in Cow<'a, String> with str, which for me is a true positive. The lint has no code to suggest &str, and I cannot repro anything like that here either.

@samueltardieu
Copy link
Member

@samueltardieu for me, it suggests replacing the String in Cow<'a, String> with str, which for me is a true positive. The lint has no code to suggest &str, and I cannot repro anything like that here either.

Indeed, I misread it, sorry for the false alarm!

@llogiq llogiq force-pushed the too-owned branch 2 times, most recently from eaa33b6 to ee4aceb Compare January 16, 2025 00:05
@llogiq
Copy link
Contributor Author

llogiq commented Jan 16, 2025

I squashed the commits and rebased on current master and edited the note regarding CStr vs. CString.

@llogiq
Copy link
Contributor Author

llogiq commented Feb 12, 2025

@y21 ping? Is there something I can do to help getting this merged?

Copy link
Member

@y21 y21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just two small doc nits. Opened the FCP thread on zulip

@y21 y21 added S-final-comment-period Status: final comment period it will be merged unless new objections are raised (~1 week) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Feb 12, 2025
@y21 y21 added this pull request to the merge queue Feb 20, 2025
Merged via the queue into rust-lang:master with commit bbf65f0 Feb 20, 2025
11 checks passed
@llogiq llogiq deleted the too-owned branch February 20, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-final-comment-period Status: final comment period it will be merged unless new objections are raised (~1 week)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TooOwned

6 participants