Open jhpratt opened 1 year ago
I should think about that. I guessed that the attributes before the function should act as test's attributes but maybe I was wrong. Maybe only a small subset like should_panic
, ignore
and skip
are test
's attributes.
I'm little scared because when the user use the injected tests attribute I cannot know what attributes this test attribute will handle... I can handle all standard attributes as tests attributes and move the others to the function but I should also introduce a syntax that the user can use to force some attribute to be applied to the test instead the function.
I'll com back here to draft the new syntax.
This correctly triggers
clippy::unwrap_used
. However, placing#[allow(clippy::unwrap_used)]
on the function does not silence the lint. This is the case regardless of the position of the attribute.Here is the current expansion (without an
#[allow]
attribute).Perhaps
#[allow]
,#[warn]
,#[deny]
, and#[forbid]
should be special-cased such that they are copied onto the resulting function? I have no idea how feasible this is.