-
Notifications
You must be signed in to change notification settings - Fork 488
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
Add more content to impl-trait.md #1017
Commits on May 6, 2021
-
Update impl-trait from edition-guide
Add impl-trait text from edition-guide, mostly unchanged except for reformatting to one sentence per line.
Configuration menu - View commit details
-
Copy full SHA for ed438b9 - Browse repository at this point
Copy the full SHA ed438b9View commit details -
Other documentation makes it reasonably clear that `impl Trait` in argument position allows the _caller_ to specify the type.
Configuration menu - View commit details
-
Copy full SHA for 999a143 - Browse repository at this point
Copy the full SHA 999a143View commit details -
impl-trait: less update-y; more reference-y
Reword a lot of things to sound less like an update and more like a reference. Add local links in a few places.
Configuration menu - View commit details
-
Copy full SHA for d9264ab - Browse repository at this point
Copy the full SHA d9264abView commit details -
impl-trait: don't talk about future Rust
Rename and rework the "Using `impl Trait` in more places" into a "Limitations" section.
Configuration menu - View commit details
-
Copy full SHA for 48d970e - Browse repository at this point
Copy the full SHA 48d970eView commit details -
impl-trait: generics vs
impl Trait
as returnRework "More details" to focus on the differences between `impl Trait` and generic type parameters in return position. Delete the `.parse()` examples because they're somewhat verbose for a reference.
Configuration menu - View commit details
-
Copy full SHA for ec1ee92 - Browse repository at this point
Copy the full SHA ec1ee92View commit details -
impl-trait: condense return type examples
Use only the closure example to illustrate the difference between returning trait objects vs `impl Trait`. Also mention usefulness in returning iterators.
Configuration menu - View commit details
-
Copy full SHA for 4531218 - Browse repository at this point
Copy the full SHA 4531218View commit details
Commits on May 20, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 1a2f82e - Browse repository at this point
Copy the full SHA 1a2f82eView commit details -
use "argument", "parameter" more consistently
Be more consistent about using "argument" to mean a concrete value provided by a function caller, and "parameter" to mean the abstract input to the function. Retain a few instances of the phrasing "in argument position", because it appears in the RFCs and implementation. Also make a note about the historical terminology inconsistency.
Configuration menu - View commit details
-
Copy full SHA for 94085bb - Browse repository at this point
Copy the full SHA 94085bbView commit details