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

Add more content to impl-trait.md #1017

Merged
merged 8 commits into from
May 24, 2021
Merged

Add more content to impl-trait.md #1017

merged 8 commits into from
May 24, 2021

Commits on May 6, 2021

  1. Update impl-trait from edition-guide

    Add impl-trait text from edition-guide, mostly unchanged except for
    reformatting to one sentence per line.
    tlyu committed May 6, 2021
    Configuration menu
    Copy the full SHA
    ed438b9 View commit details
    Browse the repository at this point in the history
  2. Fix typo(impl-trait)

    Other documentation makes it reasonably clear that `impl Trait` in
    argument position allows the _caller_ to specify the type.
    tlyu committed May 6, 2021
    Configuration menu
    Copy the full SHA
    999a143 View commit details
    Browse the repository at this point in the history
  3. 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.
    tlyu committed May 6, 2021
    Configuration menu
    Copy the full SHA
    d9264ab View commit details
    Browse the repository at this point in the history
  4. impl-trait: don't talk about future Rust

    Rename and rework the "Using `impl Trait` in more places"
    into a "Limitations" section.
    tlyu committed May 6, 2021
    Configuration menu
    Copy the full SHA
    48d970e View commit details
    Browse the repository at this point in the history
  5. impl-trait: generics vs impl Trait as return

    Rework "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.
    tlyu committed May 6, 2021
    Configuration menu
    Copy the full SHA
    ec1ee92 View commit details
    Browse the repository at this point in the history
  6. 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.
    tlyu committed May 6, 2021
    Configuration menu
    Copy the full SHA
    4531218 View commit details
    Browse the repository at this point in the history

Commits on May 20, 2021

  1. address PR feedback

    tlyu committed May 20, 2021
    Configuration menu
    Copy the full SHA
    1a2f82e View commit details
    Browse the repository at this point in the history
  2. 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.
    tlyu committed May 20, 2021
    Configuration menu
    Copy the full SHA
    94085bb View commit details
    Browse the repository at this point in the history