Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lint against MaybeUninit::uninit().assume_init() #4479

Merged
merged 1 commit into from
Sep 3, 2019
Merged

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Aug 31, 2019

changelog: add uninit_assumed_init lint

This fixes #4272

@llogiq llogiq force-pushed the uninit_assume_init branch 3 times, most recently from dfa9cdf to d56186b Compare September 1, 2019 08:29
@llogiq llogiq requested review from flip1995 and removed request for flip1995 September 1, 2019 08:57
@llogiq
Copy link
Contributor Author

llogiq commented Sep 2, 2019

r? @flip1995

Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

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

LGTM overall. Just a small NIT.

clippy_lints/src/methods/mod.rs Show resolved Hide resolved
clippy_lints/src/methods/mod.rs Outdated Show resolved Hide resolved
@flip1995 flip1995 added the S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) label Sep 2, 2019
@llogiq llogiq force-pushed the uninit_assume_init branch 2 times, most recently from 4d3a9c9 to 83eccd2 Compare September 2, 2019 20:02
@llogiq
Copy link
Contributor Author

llogiq commented Sep 3, 2019

For now, this is a "Don't do this" lint. Working with uninitialized values is so complex that I cannot come up with an easy suggestion that would be sound in all cases.

@flip1995 r?

@flip1995
Copy link
Member

flip1995 commented Sep 3, 2019

Yeah I did some reading on this topic yesterday. A suggestion that applies in general is probably not possible.

Since Clippy broke on the latest rustc master and there wasn't a rustup yet, we have to wait on merging this. cc rust-lang/rust#63561

@flip1995 flip1995 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Sep 3, 2019
@flip1995
Copy link
Member

flip1995 commented Sep 3, 2019

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented Sep 3, 2019

📌 Commit b01f2d1 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Sep 3, 2019

⌛ Testing commit b01f2d1 with merge 11da8c1...

bors added a commit that referenced this pull request Sep 3, 2019
lint against `MaybeUninit::uninit().assume_init()`

changelog: add `uninit_assumed_init` lint

This fixes #4272
@bors
Copy link
Contributor

bors commented Sep 3, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing 11da8c1 to master...

@bors bors merged commit b01f2d1 into master Sep 3, 2019
@llogiq llogiq deleted the uninit_assume_init branch September 4, 2019 01:03
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.

Lint against MaybeUninit::uninit().assume_init()
4 participants