Closed
Description
On current beta, at least, I see:
error: attempted access of field `test_results` on type `TestResult`, but no field with that name was
found
--> src/main.rs:196:25
|
196 | tests_passed += normal_test.test_results.iter().filter(|t| t.status == "ok").count();
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
help: did you mean `results`?
--> src/main.rs:196:37
|
196 | tests_passed += normal_test.test_results.iter().filter(|t| t.status == "ok").count();
| ^^^^^^^^^^^^
But I feel like I'd rather see:
error: attempted access of field `test_results` on type `TestResult`, but no field with that name was
found
--> src/main.rs:196:25
|
196 | tests_passed += normal_test.test_results.iter().filter(|t| t.status == "ok").count();
| ^^^^^^^^^^^^
= help: did you mean `results`?
Come to think of it, we could shorten the main message and move the suggestion into the label, as I think you've done elsewhere:
error: no field `test_results` on type `TestResult`
--> src/main.rs:196:25
|
196 | tests_passed += normal_test.test_results.iter().filter(|t| t.status == "ok").count();
| ^^^^^^^^^^^^ did you mean `results`?
|
Standalone example: