# \[Pre-RFC\] dyn trait declarations

**URL:** <https://internals.rust-lang.org/t/pre-rfc-dyn-trait-declarations/13413>\
**Category:** language design\
**Created:** [November 17, 2020, 3:16pm UTC](https://internals.rust-lang.org/t/pre-rfc-dyn-trait-declarations/13413 "2020-11-17T15:16:19Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Aloso](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/aloso/32/5039_2.png) [@Aloso](https://internals.rust-lang.org/u/Aloso)\
**Post date:** [November 17, 2020, 4:16pm UTC](https://internals.rust-lang.org/t/pre-rfc-dyn-trait-declarations/13413/5 "2020-11-17T16:16:10Z")

</div>

I also like this idea for another reason: A reader of the code knows immediately if the trait is object safe. Otherwise, they'd have to create a trait object and see if it fails to find out.

However, I think the syntax is a bit confusing. My suggestion is to use an `#[object_safe]` attribute instead; this expresses clearly what the feature does. It also doesn't require changing the syntax, which is already too complicated in many people's eyes.

---

_[View the full topic](https://internals.rust-lang.org/t/pre-rfc-dyn-trait-declarations/13413)._
