Open
Description
It would be really nice if Rust had some kind of built-in timeout functionality, e.g.:
panic_after(Duration::from_millis(100), || {
do_a_thing()
}
The API could be something different, maybe, and maybe there'd be a way to integrate it with the thread API instead of the test API. But either way, it would be nice to have to import an external crate to have some sort of maximum runtime for tests, to avoid infinite loops destroying the test runtime.