Description
I ran rustc -Z unstable-options --pretty=expanded <file>
on a source file to see whether a macro I'd written had worked properly. I got a lot of output, so I re-ran the command, piping the output to less
. When I did this, less properly printed stdout to my terminal. When I quit less, I saw the following output of rustc
's stderr:
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
Surprisingly, the following did not result in a panic:
rustc -Z unstable-options --pretty=expanded <file> | less > tmp
rustc -Z unstable-options --pretty=expanded <file> | less | tee tmp
Here is the source file that I ran it on and the stdout from rustc
when the panic occurred (as saved from the less session - see http://unix.stackexchange.com/questions/172624/how-do-i-write-all-lines-from-less-to-a-file): https://gist.github.com/joshlf/950a957e0107701940062a2a18d52ef6
Meta
rustc --version --verbose
:
rustc 1.13.0 (2c6933a 2016-11-07)
binary: rustc
commit-hash: 2c6933a
commit-date: 2016-11-07
host: x86_64-apple-darwin
release: 1.13.0
less --version
:
less 458 (POSIX regular expressions)
Copyright (C) 1984-2012 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Homepage: http://www.greenwoodsoftware.com/less