Tarpaulin: Coverage of unreachable lines changes with ;

Created on 26 Sep 2017  路  2Comments  路  Source: xd009642/tarpaulin

pub fn f() {
    panic!()
}

#[test]
#[should_panic]
fn t() {
    f();
    unreachable!() // adding make this line covered
}

The unreachable line is marked as not covered if ; is omitted and marked as covered it ; is added.

bug

All 2 comments

Interesting, it seems removing the semi-colon changes how the AST represents the expression. I'll have a look at this some time this week :+1:

Fixed and you'll see it in the next release (unless you're feeling adventurous and want to try it out early :wink: )

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jonhoo picture jonhoo  路  5Comments

Licenser picture Licenser  路  5Comments

Luro02 picture Luro02  路  3Comments

Aeradriel picture Aeradriel  路  8Comments

breeswish picture breeswish  路  3Comments