2024-06-19 07:58:55 +00: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 08:13:48 +00:00
|
|
|
#[coverage(yes(milord))] //~ ERROR malformed `coverage` attribute input
|
2024-06-19 07:58:55 +00:00
|
|
|
fn yes_list() {}
|
|
|
|
|
2024-06-20 08:13:48 +00:00
|
|
|
#[coverage(no(milord))] //~ ERROR malformed `coverage` attribute input
|
2024-06-19 07:58:55 +00:00
|
|
|
fn no_list() {}
|
|
|
|
|
2024-06-20 08:13:48 +00:00
|
|
|
#[coverage(yes = "milord")] //~ ERROR malformed `coverage` attribute input
|
2024-06-19 07:58:55 +00:00
|
|
|
fn yes_key() {}
|
|
|
|
|
2024-06-20 08:13:48 +00:00
|
|
|
#[coverage(no = "milord")] //~ ERROR malformed `coverage` attribute input
|
2024-06-19 07:58:55 +00:00
|
|
|
fn no_key() {}
|
|
|
|
|
|
|
|
fn main() {}
|