Multiple record builder error

This commit is contained in:
Agustin Zubiaga 2023-05-08 19:26:47 -03:00
parent 20f8133b6c
commit 6670fbb1ab
11 changed files with 115 additions and 4 deletions

View file

@ -2133,6 +2133,20 @@ fn pretty_runtime_error<'b>(
title = "DEGENERATE BRANCH";
}
RuntimeError::MultipleRecordBuilders(region) => {
let tip = alloc
.tip()
.append(alloc.reflow("You can combine them or apply them separately."));
doc = alloc.stack([
alloc.reflow("This function is applied to multiple record builders:"),
alloc.region(lines.convert_region(region)),
alloc.note("Functions can only take at most one record builder!"),
tip,
]);
title = "MULTIPLE RECORD BUILDERS";
}
}
(doc, title)