rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
98.86k stars 12.77k forks source link

rustc 1.37.0 panic #63783

Closed AxelNennker closed 5 years ago

AxelNennker commented 5 years ago

While running clippy rustc panicked.

The code is here https://github.com/AxelNennker/indy-sdk/tree/vcx_clippy

To reproduce:

I get this output

ignisvulpis@namenlos:~/development/hyperledger/indy-sdk$ cat /tmp/clippy.txt 
    Checking libvcx v0.4.0 (/home/ignisvulpis/development/hyperledger/indy-sdk/vcx/libvcx)
warning: `...` range patterns are deprecated
  --> src/utils/libindy/error_codes.rs:19:13
   |
19 |         100 ... 111 => VcxError::from_msg(VcxErrorKind::InvalidLibindyParam, error.message),
   |             ^^^ help: use `..=` for an inclusive range
   |
   = note: #[warn(ellipsis_inclusive_range_patterns)] on by default

warning: `...` range patterns are deprecated
  --> src/utils/libindy/error_codes.rs:51:13
   |
51 |         100 ... 111 => error::INVALID_LIBINDY_PARAM.code_num,
   |             ^^^ help: use `..=` for an inclusive range

warning: returning the result of a let binding from a block
  --> src/api/wallet.rs:76:9
   |
76 |           seed
   |           ^^^^
   | 
  ::: src/utils/cstring.rs:55:9
   |
55 | /         let $x = match CStringUtils::c_str_to_string($x) {
56 | |             Ok(opt_val) => opt_val,
57 | |             Err(_) => VcxError::from_msg($e, "Invalid pointer has been passed").into()
58 | |         };
   | |__________- unnecessary let binding
   |
   = note: `-W clippy::let-and-return` implied by `-W clippy::style`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
thread 'rustc' panicked at 'byte index 8 is out of bounds of `}`', src/libcore/str/mod.rs:2017:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

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

note: rustc 1.37.0 (eae3437df 2019-08-13) running on x86_64-unknown-linux-gnu

note: compiler flags: -C debuginfo=2 -C incremental --crate-type staticlib --crate-type rlib --crate-type cdylib

note: some of the compiler flags provided by cargo are hidden

error: Could not compile `libvcx`.

To learn more, run the command again with --verbose.
jonas-schievink commented 5 years ago

Duplicate of https://github.com/rust-lang/rust/issues/62973, confirmed fixed on nightly