Add regression test for is_object_safe
field on traits
This commit is contained in:
parent
c29f763153
commit
431ac40a93
19
tests/rustdoc-json/traits/is_object_safe.rs
Normal file
19
tests/rustdoc-json/traits/is_object_safe.rs
Normal file
@ -0,0 +1,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);
|
||||
}
|
Loading…
Reference in New Issue
Block a user