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
|
@ -151,7 +151,7 @@ pub(crate) struct UnallowedMutableRefs {
|
|||
pub span: Span,
|
||||
pub kind: ConstContext,
|
||||
#[note(const_eval_teach_note)]
|
||||
pub teach: Option<()>,
|
||||
pub teach: bool,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
@ -161,7 +161,7 @@ pub(crate) struct UnallowedMutableRaw {
|
|||
pub span: Span,
|
||||
pub kind: ConstContext,
|
||||
#[note(const_eval_teach_note)]
|
||||
pub teach: Option<()>,
|
||||
pub teach: bool,
|
||||
}
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(const_eval_non_const_fmt_macro_call, code = E0015)]
|
||||
|
@ -196,7 +196,7 @@ pub(crate) struct UnallowedHeapAllocations {
|
|||
pub span: Span,
|
||||
pub kind: ConstContext,
|
||||
#[note(const_eval_teach_note)]
|
||||
pub teach: Option<()>,
|
||||
pub teach: bool,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
@ -214,10 +214,10 @@ pub(crate) struct InteriorMutableDataRefer {
|
|||
#[label]
|
||||
pub span: Span,
|
||||
#[help]
|
||||
pub opt_help: Option<()>,
|
||||
pub opt_help: bool,
|
||||
pub kind: ConstContext,
|
||||
#[note(const_eval_teach_note)]
|
||||
pub teach: Option<()>,
|
||||
pub teach: bool,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue