Use bool in favor of Option<()> for diagnostics
This commit is contained in:
parent
4d5b3b1962
commit
25ff9b6bcb
48 changed files with 106 additions and 121 deletions
|
@ -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 });
|
||||
|
|
|
@ -850,7 +850,7 @@ pub(crate) struct MacroExternDeprecated {
|
|||
#[primary_span]
|
||||
pub(crate) span: Span,
|
||||
#[help]
|
||||
pub inner_attribute: Option<()>,
|
||||
pub inner_attribute: bool,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue