report location of missing type annotation #45

Closed
opened 2021-10-03 17:04:54 +08:00 by sb10q · 1 comment
Owner

Any missing type annotation currently simply reports this error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "type annotation needed"', nac3standalone/src/main.rs:65:35

When compiling more than a few lines of code, this becomes very impractical. The compiler should give some information about where the missing annotation is.

Any missing type annotation currently simply reports this error: ``` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "type annotation needed"', nac3standalone/src/main.rs:65:35 ``` When compiling more than a few lines of code, this becomes very impractical. The compiler should give some information about where the missing annotation is.
Collaborator

now the error message is something like:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "function parameter `aa` at line 23 column 9 need type annotation"', nac3standalone/src/main.rs:65:35
now the error message is something like: ``` thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "function parameter `aa` at line 23 column 9 need type annotation"', nac3standalone/src/main.rs:65:35 ```
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#45
No description provided.