Closed
Description
Steps to reproduce:
git clone https://github.com/hsivonen/encoding_rs
cd encoding_rs
rustup default beta
cargo test --release
Actual results:
failures:
---- test_labels_names::test_all_labels stdout ----
thread 'test_labels_names::test_all_labels' panicked at 'assertion failed: `(left == right)`
left: `Some(Encoding { windows-1252 })`,
right: `Some(Encoding { windows-1252 })`', src/test_labels_names.rs:11:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- tests::test_label_resolution stdout ----
thread 'tests::test_label_resolution' panicked at 'assertion failed: `(left == right)`
left: `Some(Encoding { UTF-8 })`,
right: `Some(Encoding { UTF-8 })`', src/lib.rs:4419:8
Note how left and right in both cases have the same debug stringification.
The eq
implementation assumes that there is one instance of each encoding so it's OK to pointer compare them.
Various previous stable channel releases work. Nightly works. Beta works in debug mode. 1.23.0-beta.1 fails in release mode.