Use bool in favor of Option<()> for diagnostics

This commit is contained in:
Michael Goulet
2024-08-21 00:57:58 -04:00
parent 4d5b3b1962
commit 25ff9b6bcb
48 changed files with 106 additions and 121 deletions

View File

@@ -1150,7 +1150,7 @@ impl<'a, 'b, 'tcx> BuildReducedGraphVisitor<'a, 'b, 'tcx> {
fn contains_macro_use(&mut self, attrs: &[ast::Attribute]) -> bool {
for attr in attrs {
if attr.has_name(sym::macro_escape) {
let inner_attribute = matches!(attr.style, ast::AttrStyle::Inner).then_some(());
let inner_attribute = matches!(attr.style, ast::AttrStyle::Inner);
self.r
.dcx()
.emit_warn(errors::MacroExternDeprecated { span: attr.span, inner_attribute });