Skip to content

Commit 2b4de01

Browse files
authored
Merge pull request #3939 from hlsxx/fix-typos-rfc-3654
Fix typo in 3654-return-type-notation.md
2 parents 01be9a2 + 8a17183 commit 2b4de01

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

text/3654-return-type-notation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ We encountered a number of problems with this design.
821821

822822
#### If the name is implicit, what name should we use?
823823

824-
The most impmediate problem with this proposal was trying to decide what name to use.
824+
The most immediate problem with this proposal was trying to decide what name to use.
825825

826826
Using `Widgets` (capitalized) feels arbitrary and there is no precedent within Rust for automatically creating names with different case conventions in this way.
827827

@@ -898,7 +898,7 @@ where
898898

899899
This approach has an appealing generality to it, and it opens up some interesting possibilities. For example, one might consider a trait `Const` that is implemented by all function types which are `const fn` (discussed in withoutboats's [const as an auto trait][caa] blog post). Users could then write `for<'a> F::widgets<'a>: Const` to declare that the method is a const method. However, it's rather unergonomic for the common case. It also doesn't compose well with the associated type bounds notation -- i.e., would we write something like `F: Factory<widgets::Output: Send>`?
900900

901-
To resolve the ergonomic problems, our exporations of this future wound up proposing some form of sugar to reference the `Output` type -- for example, being able to write `F::widgets(..): Send`. But that is precisely what this RFC proposes! Indeed, in the [future possibilities][] section of the RFC, we discuss the possibility of giving users some way to name the type of the `widgets` method itself, and not just its return type.
901+
To resolve the ergonomic problems, our explorations of this future wound up proposing some form of sugar to reference the `Output` type -- for example, being able to write `F::widgets(..): Send`. But that is precisely what this RFC proposes! Indeed, in the [future possibilities][] section of the RFC, we discuss the possibility of giving users some way to name the type of the `widgets` method itself, and not just its return type.
902902

903903
So why not just start with this more general approach, if we think it might be a useful extension? First, it's not clear if it would be useful. We don't have to solve the question of "const as an auto trait" in order to address the send bounds problem. Second, this approach suffers from some of the complications mentioned in the previous question, such as needing to specify the order of arguments for anonymous lifetime or impl trait parameters, and having to deal with existing traits that may shadow the desired name. Lacking a strong motivation to have this much generality, it's hard to tell how to resolve those questions, since we don't really know where/when this more general form would be used.
904904

@@ -963,7 +963,7 @@ trait LocalService<R> {
963963

964964
However, it carries the downside that users must implement `LocalService` and hence must be aware of the desugaring.
965965
It would be nicer if users could choose to implement `Service` and then (in so doing) effectively assert that all their async functions are *always* `Send`.
966-
This is not possible today due to the fact that `trait-variant` is emulating trait alias functioanlity with a blanket impl and supertraits; this is because true trait alias functionality is not yet stable.
966+
This is not possible today due to the fact that `trait-variant` is emulating trait alias functionality with a blanket impl and supertraits; this is because true trait alias functionality is not yet stable.
967967
[RFC 3437][] has proposed an extension to trait aliases that makes them implementable.
968968
The combination of accepting [RFC 3437][] and stabilizing trait aliases would make these aliases nicer for users as a result.
969969

0 commit comments

Comments
 (0)