]> git.proxmox.com Git - rustc.git/blob - vendor/rustc-rayon-core/tests/double_init_fail.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / vendor / rustc-rayon-core / tests / double_init_fail.rs
1 use rayon_core::ThreadPoolBuilder;
2 use std::error::Error;
3
4 #[test]
5 fn double_init_fail() {
6 let result1 = ThreadPoolBuilder::new().build_global();
7 assert_eq!(result1.unwrap(), ());
8 let err = ThreadPoolBuilder::new().build_global().unwrap_err();
9 assert!(err.description() == "The global thread pool has already been initialized.");
10 }