Skip to content
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

RFC: Multi-Type Return Position Impl Trait (MTRPIT) #3367

Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add dispatch-safety todo
  • Loading branch information
yoshuawuyts committed Jan 9, 2023
commit 6d5381e28095dfe37451a803bed2640860ee5fef
9 changes: 8 additions & 1 deletion text/0000-multi-type-return-position-impl-trait.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- [Anonymous enums](#anonymous-enums)
- [Language-level support for delegation/proxies](#language-level-support-for-delegationproxies)
- [(TODO) Mark unimplementable/sealed trait methods](#todo-mark-unimplementablesealed-trait-methods)
- [(TODO) Annotate dispatch-safety](#todo-annotate-dispatch-safety)
- [(TODO) Clippy lint tracking big impl traits](#todo-clippy-lint-tracking-big-impl-traits)


Expand Down Expand Up @@ -320,7 +321,7 @@ is: just say it's an `impl Trait`.)
## (TODO) `Any` trait and `TypeId`

TODO (tldr: proxy the type id to the inner type, that's what `dyn` does too. You
can't downcast `impl Trait` as-is anyway, so it's likely fine.
can't downcast `impl Trait` as-is anyway, so it's likely fine).

# Interaction with lifetimes

Expand Down Expand Up @@ -658,6 +659,12 @@ but that information is not available from the interface anywhere. Can we
surface or somehow mark which methods can _actually_ be overloaded, versus which
can't?)

## (TODO) Annotate dispatch-safety

TODO (tldr receiverless functions (static methods) and traits with associated
consts can't be delegated to. We should have some opt-in or opt-out marker for a
trait which can be dispatched to.)

## (TODO) Clippy lint tracking big impl traits

TODO (tldr clippy tracks big enums and big errors already, it probably should
Expand Down