1
Fork 0

Remove const eval limit and implement an exponential backoff lint instead

This commit is contained in:
Oli Scherer 2022-11-02 11:57:40 +00:00
parent 578bcbc2b4
commit 05eae08233
41 changed files with 325 additions and 261 deletions

View file

@ -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,
}