Closed
Description
(reference implementation: rust-lang/rust#49898 )
So far, rustc has only printed about filenames and line numbers for warnings and errors. I think it is rather missed, compared to gcc
and other compilers, that useful context information such as function
names and structs is not included.
We can improve the information that rustc
prints for warnings and errors in this regard, by adding a new line to precede the warning or the error.
For example:
In function `test`:
warning: unused variable: `a`
In enum `MyEnum`:
warning: variant is never constructed: `ItemB`
--> various-warnings.rs:8:5
|
8 | ItemB,
| ^^