rust-cli / human-panic

Panic messages for humans.
https://docs.rs/human-panic
Apache License 2.0
1.66k stars 65 forks source link

Minimum Supported Rust Version isn't supported #79

Closed Michael-F-Bryan closed 1 year ago

Michael-F-Bryan commented 3 years ago

Choose one: this is a 🐛 bug report

A number of this crate's dependencies no longer compile on Rust 1.36.0, meaning this crate is no longer usable on Rust 1.36.0.

Expected Behavior

Running cargo +1.36.0 build should pass.

Current Behavior

There are almost certainly more compile errors, but running cargo +1.36.0 build shows that rustc-demangle and memchr no longer work with Rust 1.36.0.

Possible Solution

There are two possible solutions:

  1. Update this crate's MSRV (a breaking change)
  2. Pin the offending crates to a supported version

I don't believe the second solution is feasible because the offending crates are transitive dependencies.

The best solution would be to bump the MSRV and create a new major release. While we're at it, we could use some newer Rust features so there are less breaking changes in the future or take advantage of recent features.

Context

I don't particularly mind because I almost always use nightly or stable Rust, but MSRV is very important to some people and we should try to accommodate them.

Code Sample

$ git checkout ffe447a2c66b41b338edb440470c42050bbc0dd5
$ cargo +1.36.0 test
  ...
error: cannot find macro `matches!` in this scope
   --> /home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-demangle-0.1.21/src/v0.rs:700:20
    |
700 |                 if matches!((quote, c), ('\'', '"') | ('"', '\'')) {
    |                    ^^^^^^^

error: aborting due to previous error

error: Could not compile `rustc-demangle`.
warning: build failed, waiting for other jobs to finish...
error[E0658]: naming constants with `_` is unstable
  --> /home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.4.1/src/memmem/prefilter/fallback.rs:37:1
   |
37 | const _: PrefilterFnTy = find;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/54912

error[E0658]: naming constants with `_` is unstable
 --> /home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.4.1/src/memmem/prefilter/x86/sse.rs:9:1
  |
9 | const _: PrefilterFnTy = find;
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: for more information, see https://github.com/rust-lang/rust/issues/54912

error[E0658]: non exhaustive is an experimental feature
   --> /home/michael/.cargo/registry/src/github.com-1ecc6299db9ec823/memchr-2.4.1/src/memmem/prefilter/mod.rs:152:1
    |
152 | #[non_exhaustive]
    | ^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/44109

error: aborting due to 3 previous errors

Your Environment

This was tested against ffe447a2c66b41b338edb440470c42050bbc0dd5 using Rust 1.36.0 on Linux.

epage commented 1 year ago

Dependencies do not affect MSRV so long as the minimum version still works.