Merge pull request #7038 from mulias/expr-dbg

Support `dbg` in expressions
This commit is contained in:
Anton-4 2024-09-02 13:30:32 +02:00 committed by GitHub
commit 02cf61f985
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 1308 additions and 249 deletions

View file

@ -220,6 +220,12 @@ pub enum Problem {
OverAppliedCrash {
region: Region,
},
UnappliedDbg {
region: Region,
},
OverAppliedDbg {
region: Region,
},
FileProblem {
filename: PathBuf,
error: io::ErrorKind,
@ -313,6 +319,8 @@ impl Problem {
// injecting a crash message
Problem::UnappliedCrash { .. } => RuntimeError,
Problem::OverAppliedCrash { .. } => RuntimeError,
Problem::UnappliedDbg { .. } => RuntimeError,
Problem::OverAppliedDbg { .. } => RuntimeError,
Problem::DefsOnlyUsedInRecursion(_, _) => Warning,
Problem::FileProblem { .. } => Fatal,
}
@ -477,6 +485,8 @@ impl Problem {
| Problem::UnnecessaryOutputWildcard { region }
| Problem::OverAppliedCrash { region }
| Problem::UnappliedCrash { region }
| Problem::OverAppliedDbg { region }
| Problem::UnappliedDbg { region }
| Problem::DefsOnlyUsedInRecursion(_, region) => Some(*region),
Problem::RuntimeError(RuntimeError::CircularDef(cycle_entries))
| Problem::BadRecursion(cycle_entries) => {