Skip to content

Commit

Permalink
add dyn_compatible field to Trait data model (#718) (#719)
Browse files Browse the repository at this point in the history
close part of #535

---------

Co-authored-by: Predrag Gruevski
<2348618+obi1kenobi@users.noreply.github.com>

Co-authored-by: frankwang <73262844+Frank-III@users.noreply.github.com>
  • Loading branch information
obi1kenobi and Frank-III authored Jan 27, 2025
1 parent 981626a commit bdad798
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/adapter/properties.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ pub(super) fn resolve_trait_property<'a, V: AsVertex<Vertex<'a>> + 'a>(
) -> ContextOutcomeIterator<'a, V, FieldValue> {
match property_name {
"unsafe" => resolve_property_with(contexts, field_property!(as_trait, is_unsafe)),
"object_safe" => {
"object_safe" | "dyn_compatible" => {
resolve_property_with(contexts, field_property!(as_trait, is_dyn_compatible))
}
"sealed" => resolve_property_with(contexts, move |vertex| {
Expand Down
7 changes: 6 additions & 1 deletion src/rustdoc_schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,12 @@ type Trait implements Item & Importable & GenericItem {
"""
Whether this trait can be used as `dyn Trait`.
"""
object_safe: Boolean!
object_safe: Boolean! @deprecated(reason: "use `dyn_compatible` instead")

"""
Whether this trait can be used as `dyn Trait`.
"""
dyn_compatible: Boolean!

"""
Whether downstream crates are prevented from implementing this trait themselves.
Expand Down

0 comments on commit bdad798

Please sign in to comment.