Trying to debug print the difference of two BTreeSets goes into endless print loop. #41338
Labels
regression-from-stable-to-beta
Performance or correctness regression from stable to beta.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
I tried printing difference of two BTreeSets using the debug print, but instead of printing anything useful it went into some weird recursive loop printing Difference(Difference(Difference endlessly.
I tried this code:
I obviously expected it to print something like Difference(contents) just like when debug printing some vec.iter().
Instead, it started printing this:
It wouldn't stop until I killed the process.
I read the source file set.rs and I couldn't find any Debug implementation or derivation for Difference struct so I think it might be related somehow. I don't really know how it compiles without Debug being implemented / derived on this struct but I don't understand how language intrinsics work just yet.
Meta
`rustc --version --verbose
rustc 1.18.0-nightly (28a7429 2017-04-13)
binary: rustc
commit-hash: 28a7429
commit-date: 2017-04-13
host: x86_64-apple-darwin
release: 1.18.0-nightly
LLVM version: 3.9'
It doesn't panic so there's no backtrace to put here.
The text was updated successfully, but these errors were encountered: