Closed
Description
The latest nightly is seeing an ICE when testing num-macros
, which uses the old way to do custom #[derive]
. We should probably just kill this already in favor of num-derive
, but an ICE is always a bug, so...
$ rustc -Vv
rustc 1.17.0-nightly (134c4a0f0 2017-03-20)
binary: rustc
commit-hash: 134c4a0f08a3d1f55ea8968fbe728fa935c71698
commit-date: 2017-03-20
host: x86_64-unknown-linux-gnu
release: 1.17.0-nightly
LLVM version: 3.9
$ RUST_BACKTRACE=1 cargo test --verbose
Fresh rustc-serialize v0.3.23
Fresh libc v0.2.21
Fresh num-traits v0.1.37 (file:///home/jistone/rust/num/traits)
Fresh rand v0.3.15
Fresh num-integer v0.1.33 (file:///home/jistone/rust/num/integer)
Fresh num-complex v0.1.36 (file:///home/jistone/rust/num/complex)
Fresh num-bigint v0.1.37 (file:///home/jistone/rust/num/bigint)
Fresh num-iter v0.1.33 (file:///home/jistone/rust/num/iter)
Fresh num-rational v0.1.36 (file:///home/jistone/rust/num/rational)
Fresh num v0.1.37 (file:///home/jistone/rust/num)
Compiling num-macros v0.1.38 (file:///home/jistone/rust/num/macros)
Running `rustc --crate-name test_macro tests/test_macro.rs --emit=dep-info,link -C debuginfo=2 --test -C metadata=76c45b1c35404d75 -C extra-filename=-76c45b1c35404d75 --out-dir /home/jistone/rust/num/macros/target/debug/deps -L dependency=/home/jistone/rust/num/macros/target/debug/deps --extern num=/home/jistone/rust/num/macros/target/debug/deps/libnum-f3942086a4d575b2.rlib --extern num_macros=/home/jistone/rust/num/macros/target/debug/deps/libnum_macros.so`
warning: `#[derive]` for custom traits is deprecated and will be removed in the future. Prefer using procedural macro custom derive.
--> tests/test_macro.rs:16:28
|
16 | #[derive(Debug, PartialEq, NumFromPrimitive)]
| ^^^^^^^^^^^^^^^^
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: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'index out of bounds: the len is 1 but the index is 1', /checkout/src/libcollections/vec.rs:1426
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
stack backtrace:
0: rustc_resolve::macros::<impl syntax::ext::base::Resolver for rustc_resolve::Resolver<'a>>::find_legacy_attr_invoc
1: <syntax::ext::expand::InvocationCollector<'a, 'b> as syntax::fold::Folder>::fold_item
2: <collections::vec::Vec<T> as syntax::util::move_map::MoveMap<T>>::move_flat_map
3: syntax::fold::noop_fold_item_kind
4: syntax::fold::noop_fold_item_simple
5: <syntax::ext::expand::InvocationCollector<'a, 'b> as syntax::fold::Folder>::fold_item
6: <core::iter::FlatMap<I, U, F> as core::iter::iterator::Iterator>::next
7: syntax::ext::expand::Expansion::fold_with
8: syntax::ext::expand::MacroExpander::collect_invocations
9: syntax::ext::expand::MacroExpander::expand
10: syntax::ext::expand::MacroExpander::expand_crate
11: rustc_driver::driver::phase_2_configure_and_expand::{{closure}}
12: rustc_driver::driver::phase_2_configure_and_expand
13: rustc_driver::driver::compile_input
14: rustc_driver::run_compiler
15: std::panicking::try::do_call
16: __rust_maybe_catch_panic
at /checkout/src/libpanic_unwind/lib.rs:98
17: <F as alloc::boxed::FnBox<A>>::call_box
18: std::sys::imp::thread::Thread::new::thread_start
at /checkout/src/liballoc/boxed.rs:650
at /checkout/src/libstd/sys_common/thread.rs:21
at /checkout/src/libstd/sys/unix/thread.rs:84
19: start_thread
20: clone
error: Could not compile `num-macros`.
Caused by:
process didn't exit successfully: `rustc --crate-name test_macro tests/test_macro.rs --emit=dep-info,link -C debuginfo=2 --test -C metadata=76c45b1c35404d75 -C extra-filename=-76c45b1c35404d75 --out-dir /home/jistone/rust/num/macros/target/debug/deps -L dependency=/home/jistone/rust/num/macros/target/debug/deps --extern num=/home/jistone/rust/num/macros/target/debug/deps/libnum-f3942086a4d575b2.rlib --extern num_macros=/home/jistone/rust/num/macros/target/debug/deps/libnum_macros.so` (exit code: 101)
Metadata
Metadata
Assignees
Labels
No labels