summary refs log tree commit diff
path: root/tests/rustdoc-json/traits/is_object_safe.rs
blob: 35c4e4eb84799be1363a095110306c4f3ce7b05a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![no_std]

//@ has "$.index[*][?(@.name=='FooUnsafe')]"
//@ is "$.index[*][?(@.name=='FooUnsafe')].inner.trait.is_object_safe" false
pub trait FooUnsafe {
    fn foo() -> Self;
}

//@ has "$.index[*][?(@.name=='BarUnsafe')]"
//@ is "$.index[*][?(@.name=='BarUnsafe')].inner.trait.is_object_safe" false
pub trait BarUnsafe<T> {
    fn foo(i: T);
}

//@ has "$.index[*][?(@.name=='FooSafe')]"
//@ is "$.index[*][?(@.name=='FooSafe')].inner.trait.is_object_safe" true
pub trait FooSafe {
    fn foo(&self);
}