Skip to content

Commit a9de455

Browse files
committed
add an unresolved question
1 parent b01d0ad commit a9de455

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

text/0000-return-type-notation.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,14 @@ C++ has [`decltype`](https://en.cppreference.com/w/cpp/language/decltype) expres
953953

954954
>- What parts of the design do you expect to resolve through the implementation of this feature before stabilization?
955955
956-
None.
956+
## Does stabilizing `T::foo(..)` notation as a standalone type create a confusing inconsistency with `-> ()` shorthand?
957+
958+
Unlike a regular associated type, this RFC does not allow a trait bound that specifies the return type of a method, only the ability to put bounds on that return type.
959+
rpjohnst suggested that we may wish to support a syntax like `T: Trait<method(..) -> T>`, perhaps in conjunction with specified argument types.
960+
They further pointed out that permitting `T::method(..)` as a standalone type could be seen as inconsistent, given that `fn foo()` is normally shorthand for `-> ()`.
961+
However, *not* supporting `T::method(..)` as a standalone type could also be seen as inconsistent, since normally `T: Trait<Bar: Send>` and `T::Bar: Send` are equivalent.
962+
Prior to stabilizing the "send position" syntax, we should be sure we are comfortable with this.
963+
957964

958965
# Future possibilities
959966
[future possibilities]: #future-possibilities

0 commit comments

Comments
 (0)