Skip to content
Myr

Add more autotraits tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Tolnay · committed by David Tolnay · parent 139f266 · Browse files · 1 file+19 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+19 added−0 removed

  • tests:+19 added−0 removed

1 file+19 added−0 removed

modified:tests/test_autotrait.rs+19 added
1#![allow(clippy::extra_unused_type_parameters)]23use anyhow::Error;4use std::panic::{RefUnwindSafe, UnwindSafe};56#[test]7fn test_send() {8 fn assert_send<T: Send>() {}
4 unmodified lines
13fn test_sync() {14 fn assert_sync<T: Sync>() {}15 assert_sync::<Error>();16}1718#[test]19fn test_unwind_safe() {20 fn assert_unwind_safe<T: UnwindSafe>() {}21 assert_unwind_safe::<Error>();22}2324#[test]25fn test_ref_unwind_safe() {26 fn assert_ref_unwind_safe<T: RefUnwindSafe>() {}27 assert_ref_unwind_safe::<Error>();28}2930#[test]31fn test_unpin() {32 fn assert_unpin<T: Unpin>() {}33 assert_unpin::<Error>();34}