Open Noratrieb opened 1 month ago
Shouldn't desired output contain error: aborting due to 1 previous error
instead of error: aborting due to 2 previous errors
since there is just one error in that case?
I assume that part deduplicates the diagnostics or something like that
Sorry if I misunderstood but I mean the desired output you put above:
error[E0453]: allow(unsafe_code) incompatible with previous forbid
--> tests/ui/lint/deny-inside-forbid-ignored.rs:4:17
|
1 | #[forbid(unsafe_code)] // NO UNSAFE CODE IN HERE!!
| ----------- `forbid` level set here
...
4 | #[allow(unsafe_code)] // let's have some unsafe code in here
| ^^^^^^^^^^^ overruled by previous forbid
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0453`.
I think it should state:
error: aborting due to 1 previous error
instead of the current statement:
error: aborting due to 2 previous errors
since there is just one error in that case.
Do you agree?
oh right
I didn't try the code yet but I also didn't get why the first output states that there were 2 errors; the second one is just a duplicate so shouldn't there just be 1 error in that case as well?
It is better now but I think 1 previous error
is the right usage instead of 1 previous errors
.
the code just counts the errors, and there are 2 errors, so it says there are 2 errors. that's fine, nothing wrong with that
Code
Current output
Desired output
Rationale and extra context
Use
-Zdeduplicate-diagnostics=false
more context can be found in
tests/ui/lint/issue-70819-dont-override-forbid-in-same-scope.rs
Other cases
No response
Rust Version
rustc 1.83.0-nightly (14f303bc1 2024-10-04) binary: rustc commit-hash: 14f303bc1430a78ddaa91b3e104bbe4c0413184e commit-date: 2024-10-04 host: x86_64-unknown-linux-gnu release: 1.83.0-nightly LLVM version: 19.1.0
Anything else?
No response