rusty-fork icon indicating copy to clipboard operation
rusty-fork copied to clipboard

rusty_fork_test! macro throws a compiler error on tests that return Result<(), Error>

Open pcallahan-r7 opened this issue 6 years ago • 0 comments

    use std::env;

    rusty_fork_test! {

    #[test]
    fn test_result() -> Result<(), env::VarError> {
        let x = env::var("HOME")?;
        Ok(())
    }
    }

error

error: no rules expected the token `->`
   --> myfile.rs
    |
236 |     fn test_result() -> Result<(), env::VarError> {
    |                      ^^ no rules expected this token in macro call

pcallahan-r7 avatar Dec 24 '19 17:12 pcallahan-r7