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

don't suggest closures over constants #919

Merged
merged 1 commit into from
May 12, 2016
Merged

don't suggest closures over constants #919

merged 1 commit into from
May 12, 2016

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented May 12, 2016

fixes #917

the error is occurring in clippy if updated to the latest clippy and nightly (latest nightly from multirust that is, which is from the 9th).

@mcarton mcarton merged commit fe6ad91 into rust-lang:master May 12, 2016
@mcarton
Copy link
Member

mcarton commented May 12, 2016

Thanks!

@oli-obk oli-obk deleted the fix/917 branch May 27, 2016 09:09
bors added a commit that referenced this pull request Apr 23, 2019
Ignore non-const ctor expressions in or_fn_call

Fixes #1338

Should have been fixed by #919, however that focuses on const ctor expressions only, and `.or(Some(local))` isn't const.

This also automatically ignores things like `.or(Some(local.clone())` which we don't actually want to do; I need to figure out what to do here.

changelog: Fixed false positive in [`or_fn_call`] pertaining to enum variant constructors

r? @oli-obk @phansch
bors added a commit that referenced this pull request Apr 23, 2019
Ignore non-const ctor expressions in or_fn_call

Fixes #1338

Should have been fixed by #919, however that focuses on const ctor expressions only, and `.or(Some(local))` isn't const.

This also automatically ignores things like `.or(Some(local.clone())` which we don't actually want to do; I need to figure out what to do here.

changelog: Fixed false positive in [`or_fn_call`] pertaining to enum variant constructors

r? @oli-obk @phansch
bors added a commit that referenced this pull request Apr 23, 2019
Ignore non-const ctor expressions in or_fn_call

Fixes #1338

Should have been fixed by #919, however that focuses on const ctor expressions only, and `.or(Some(local))` isn't const.

This also automatically ignores things like `.or(Some(local.clone())` which we don't actually want to do; I need to figure out what to do here.

changelog: Fixed false positive in [`or_fn_call`] pertaining to enum variant constructors

r? @oli-obk @phansch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

or_fun_call warns on enum variant construction.
2 participants