2024-06-19 02:58:55 -05:00
|
|
|
#![feature(coverage_attribute)]
|
|
|
|
//@ edition: 2021
|
|
|
|
|
|
|
|
// Check that yes/no in `#[coverage(yes)]` and `#[coverage(no)]` must be bare
|
|
|
|
// words, not part of a more complicated substructure.
|
|
|
|
|
2024-06-20 03:13:48 -05:00
|
|
|
#[coverage(yes(milord))] //~ ERROR malformed `coverage` attribute input
|
2024-06-19 02:58:55 -05:00
|
|
|
fn yes_list() {}
|
|
|
|
|
2024-06-20 03:13:48 -05:00
|
|
|
#[coverage(no(milord))] //~ ERROR malformed `coverage` attribute input
|
2024-06-19 02:58:55 -05:00
|
|
|
fn no_list() {}
|
|
|
|
|
2024-06-20 03:13:48 -05:00
|
|
|
#[coverage(yes = "milord")] //~ ERROR malformed `coverage` attribute input
|
2024-06-19 02:58:55 -05:00
|
|
|
fn yes_key() {}
|
|
|
|
|
2024-06-20 03:13:48 -05:00
|
|
|
#[coverage(no = "milord")] //~ ERROR malformed `coverage` attribute input
|
2024-06-19 02:58:55 -05:00
|
|
|
fn no_key() {}
|
|
|
|
|
|
|
|
fn main() {}
|