Remove const eval limit and implement an exponential backoff lint instead
This commit is contained in:
parent
578bcbc2b4
commit
05eae08233
41 changed files with 325 additions and 261 deletions
|
@ -1,5 +1,5 @@
|
|||
use rustc_hir::ConstContext;
|
||||
use rustc_macros::Diagnostic;
|
||||
use rustc_macros::{Diagnostic, LintDiagnostic};
|
||||
use rustc_span::Span;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
|
@ -194,3 +194,21 @@ pub(crate) struct InteriorMutabilityBorrow {
|
|||
#[primary_span]
|
||||
pub span: Span,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(const_eval_long_running)]
|
||||
#[note]
|
||||
pub struct LongRunning {
|
||||
#[help]
|
||||
pub item_span: Span,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(const_eval_long_running)]
|
||||
pub struct LongRunningWarn {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
#[help]
|
||||
pub item_span: Span,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue