-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should TensorType be a sealed trait or marked unsafe? #284
Comments
It should definitely be sealed. This would be a great easy improvement for someone in the community to work on. |
I would like this issue to be assigned to me. I believe I understand the sealed paradigm and have it implemented properly within lib.rs. Not 100% sure the proper way to test its correctness though. The only real decision I'm not sure about is to |
@adamcrume I have the change finished and documented. Can I be assigned this issue so I can create the pull request? I decided on the templated approach as the underlying trait is templated without restrictions. |
Definitely! I look forward to seeing the PR. |
Hi there, we (Rust group @sslab-gatech) are scanning crates on crates.io for potential soundness bugs. We noticed that the
TensorType
trait is commented as:Since implementing this trait improperly potentially allows for dangerous behavior and is commented as something that shouldn't be implemented, would it make sense to seal this trait as per https://rust-lang.github.io/api-guidelines/future-proofing.html#sealed-traits-protect-against-downstream-implementations-c-sealed or to mark it an
unsafe trait
?The text was updated successfully, but these errors were encountered: