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

turbo-tasks: Expand <T as TaskOutput>::Return values in macros #8096

Merged
merged 2 commits into from
May 7, 2024

Commits on May 7, 2024

  1. Expand TaskOutput::Return values in the turbo-tasks macros

    Previously, we'd return types like:
    
    ```
    <Vc<AssetIdent> as TaskOutput>::Return
    ```
    
    which is equivalent to the much simpler:
    
    ```
    Vc<AssetIdent>
    ```
    
    It's nice because it's easier to implement in the macros, and it's more
    correct, because it uses the type system to verify the type of `Vc` and
    `Result` are what we expect. However, it makes the rustdoc output hard
    to read.
    
    This attempts to the expansion of `TaskOutput::Return` inside the macro
    to generate more readable documentation, at the cost of some
    correctness.
    bgw committed May 7, 2024
    Configuration menu
    Copy the full SHA
    c9b762b View commit details
    Browse the repository at this point in the history
  2. Also expand () to Vc<()>

    Some unit tests used this expansion.
    bgw committed May 7, 2024
    Configuration menu
    Copy the full SHA
    1ffa91c View commit details
    Browse the repository at this point in the history