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

macros: forward input arguments in #[tokio::test] #3691

Merged
merged 2 commits into from
Apr 11, 2021

Commits on Apr 10, 2021

  1. macros: forward input arguments in #[tokio::test]

    Fixes #2388
    
    Previously `#[tokio::test]` would error on functions that took
    arguments. That meant other attribute macros couldn't do further
    transformations on them. This changes that so arguments are forwarded as
    is.
    
    Whatever else might be included on the function is forwarded as well.
    For example return type, generics, etc.
    
    Worth noting that this is only for compatibility with other macros.
    `#[test]`s that take arguments will still fail to compile.
    
    A bit odd that [trybuild] tests don't fail `#[test]` functions with
    arguments which is why the new tests are run with `t.pass(...)`. They do
    actually fail if part of a real crate.
    
    [trybuild]: https://crates.io/crates/trybuild
    davidpdrsn committed Apr 10, 2021
    Configuration menu
    Copy the full SHA
    a3664f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2021

  1. Fix unused braces warning

    davidpdrsn committed Apr 11, 2021
    Configuration menu
    Copy the full SHA
    650ae40 View commit details
    Browse the repository at this point in the history