Separate find_*_stability.

This commit is contained in:
Camille GILLOT 2023-01-29 15:56:47 +00:00
parent 17f1db672e
commit 5f9c004d35
3 changed files with 103 additions and 119 deletions

View file

@ -793,7 +793,9 @@ impl SyntaxExtension {
)
})
.unwrap_or_else(|| (None, helper_attrs));
let (stability, const_stability, body_stability) = attr::find_stability(&sess, attrs, span);
let stability = attr::find_stability(&sess, attrs, span);
let const_stability = attr::find_const_stability(&sess, attrs, span);
let body_stability = attr::find_body_stability(&sess, attrs);
if let Some((_, sp)) = const_stability {
sess.emit_err(errors::MacroConstStability {
span: sp,