started at 22:00 ...
Finished test [unoptimized + debuginfo] target(s) in 0.07s
Running unittests src/main.rs (target/debug/deps/bar-428754c700be1e3a)
Test ignored.
thread 'model::tests::add_delta_panic_overflow' panicked at 'overflow', src/model/foo.rs:392:51
stack backtrace:
0: rust_begin_unwind
at /rustc/ee915c34e2f33a07856a9e39be7e35e648bfbd5d/library/std/src/panicking.rs:584:5
1: core::panicking::panic_fmt
at /rustc/ee915c34e2f33a07856a9e39be7e35e648bfbd5d/library/core/src/panicking.rs:143:14
2: core::panicking::panic_display
at /rustc/ee915c34e2f33a07856a9e39be7e35e648bfbd5d/library/core/src/panicking.rs:72:5
3: core::panicking::panic_str
at /rustc/ee915c34e2f33a07856a9e39be7e35e648bfbd5d/library/core/src/panicking.rs:56:5
4: core::option::expect_failed
at /rustc/ee915c34e2f33a07856a9e39be7e35e648bfbd5d/library/core/src/option.rs:1874:5
5: core::option::Option<T>::expect
at /rustc/ee915c34e2f33a07856a9e39be7e35e648bfbd5d/library/core/src/option.rs:718:21
set_hook
более красиво вроде нельзя
Лан, впилю эроры вместо паник(
так ты RUST_BACKTRACE=0 сделай
error: implementation of `FnOnce` is not general enough --> src/model/foo.rs:898:30 | 898 | std::panic::set_hook(Box::new(drop)); | ^^^^^^^^^^^^^^ implementation of `FnOnce` is not general enough | = note: `fn(&'2 PanicInfo<'_>) {std::mem::drop::<&'2 PanicInfo<'_>>}` must implement `FnOnce<(&'1 PanicInfo<'_>,)>`, for any lifetime `'1`... = note: ...but it actually implements `FnOnce<(&'2 PanicInfo<'_>,)>`, for some specific lifetime `'2`
так я хочу стектрейсы в тестах которые не должны паниковать
а просто дроп нельзя?
Обсуждают сегодня