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

Fix CI by suppressing clippy::manual_non_exhaustive warning #828

Closed

Conversation

rhysd
Copy link

@rhysd rhysd commented Jul 1, 2020

CI is failing since clippy raises a warning:

error: this seems like a manual implementation of the non-exhaustive pattern
  --> src/error.rs:37:1
   |
37 |   pub enum ErrorKind {
   |   ^-----------------
   |   |
   |  _help: add the attribute: `#[non_exhaustive] pub enum ErrorKind`
   | |
38 | |     /// incompatible shape
39 | |     IncompatibleShape = 1,
40 | |     /// incompatible memory layout
...  |
51 | |     __Incomplete,
52 | | }
   | |_^
   |
   = note: `-D clippy::manual-non-exhaustive` implied by `-D warnings`
help: remove this variant
  --> src/error.rs:51:5
   |
51 |     __Incomplete,
   |     ^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_non_exhaustive

https://travis-ci.org/github/rust-ndarray/ndarray/jobs/702749109

However, #[non_exhaustive] attribute is not available because Rust 1.37.0, which seems MSRV of this library, did not stabilize the attribute.

For now, I think clippy::manual-non-exhaustive should be suppressed until the attribute is available by bumping up MSRV.

@ZuseZ4
Copy link
Contributor

ZuseZ4 commented Nov 11, 2020

@xd009642
Apparently this issue is still up to date with Rust 1.47.
In my opinion having a build-failing sign on the start page isn't the best PR, especially since it's due to such a small issue.
#[non_exhaustive] is available since Rust 1.40, so we could just update this.
If you agree I would just change that, so we can merge it and hopefully have a working CI again?

@xd009642
Copy link
Contributor

Yeah, I'd agree to up the MSRV and and bump the minor version for the next release.

@xd009642
Copy link
Contributor

Oh also in the docs we've promised to up the MSRV with this line 😉

The crate is continuously developing, and breaking changes are expected during evolution from version to version. We adopt the newest stable rust features if we need them.

@ZuseZ4 ZuseZ4 mentioned this pull request Nov 11, 2020
@ZuseZ4
Copy link
Contributor

ZuseZ4 commented Nov 28, 2020

Can be closed due to
Duplicate of #848

@bluss bluss closed this Nov 28, 2020
@bluss
Copy link
Member

bluss commented Nov 28, 2020

Thanks for working on this, anyway

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.

None yet

4 participants