switch from type annotation to type variable

This commit is contained in:
Brendan Hansknecht 2023-04-06 20:17:22 -07:00
parent 8f4945f286
commit 6302a8d4b5
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
11 changed files with 136 additions and 97 deletions

View file

@ -1094,7 +1094,7 @@ pub fn can_problem<'b>(
title = "OVERAPPLIED CRASH".to_string();
}
Problem::FileProblem { filename, error } => {
let report = to_file_problem_report(&alloc, &filename, error);
let report = to_file_problem_report(alloc, &filename, error);
doc = report.doc;
title = report.title;
}

View file

@ -1655,10 +1655,11 @@ fn format_category<'b>(
alloc.concat([this_is, alloc.text(" a Unicode scalar value")]),
alloc.text(" of type:"),
),
IngestedFile => (
// TODO: is this what we actually want for the error message here.
// Should we somehow get the file name piped to here or type annotation?
alloc.concat([this_is, alloc.text(" an ingested file")]),
IngestedFile(file_path) => (
alloc.concat([
this_is,
alloc.text(format!(" an ingested file ({:?})", file_path)),
]),
alloc.text(" of type:"),
),
Lambda => (