File: test_autotrait.rs

package info (click to toggle)
rust-anyhow 1.0.99-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 500 kB
  • sloc: makefile: 2
file content (34 lines) | stat: -rw-r--r-- 631 bytes parent folder | download | duplicates (22)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#![allow(clippy::extra_unused_type_parameters)]

use anyhow::Error;
use std::panic::{RefUnwindSafe, UnwindSafe};

#[test]
fn test_send() {
    fn assert_send<T: Send>() {}
    assert_send::<Error>();
}

#[test]
fn test_sync() {
    fn assert_sync<T: Sync>() {}
    assert_sync::<Error>();
}

#[test]
fn test_unwind_safe() {
    fn assert_unwind_safe<T: UnwindSafe>() {}
    assert_unwind_safe::<Error>();
}

#[test]
fn test_ref_unwind_safe() {
    fn assert_ref_unwind_safe<T: RefUnwindSafe>() {}
    assert_ref_unwind_safe::<Error>();
}

#[test]
fn test_unpin() {
    fn assert_unpin<T: Unpin>() {}
    assert_unpin::<Error>();
}