You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error message on Windows missing "required by" hint #66860
I've found some kind of regression in error reporting. In short, the same code compiled by nightly-2019-11-25 yields different error messages on Linux (Ubuntu) and Windows. On Ubuntu:
error[E0283]: type annotations needed: cannot resolve `_: error_mismatch::Trait`
--> tests/fail.rs:4:13
|
4 | let _ = collect();
| ^^^^^^^
|
::: /home/runner/work/test-error-mismatch/test-error-mismatch/src/lib.rs:9:19
|
9 | pub fn collect<T: Trait>() -> T {
| ----- required by this bound in `error_mismatch::collect`
On Windows:
error[E0283]: type annotations needed: cannot resolve `_: error_mismatch::Trait`
--> tests\fail.rs:4:13
|
4 | let _ = collect();
| ^^^^^^^
I can reproduce this on 1.43, however I can't on nightly. I think this was fixed along with #53081 in #70642?
1.43 output
error[E0283]: type annotations needed
--> tests\fail.rs:4:13
|
4 | let _ = collect();
| - ^^^^^^^
| | |
| | cannot infer type for type parameter `T` declared on the function `collect`
| | help: consider specifying the type argument in the function call: `collect::<T>`
| consider giving this pattern a type
|
= note: cannot resolve `_: error_mismatch::Trait`
nightly 2020-04-27 output
error[E0283]: type annotations needed
--> tests\fail.rs:4:13
4 | let _ = collect();
| - ^^^^^^^ cannot infer type for type parameter `T` declared on the function `collect`
| |
| consider giving this pattern a type
::: C:\Users\mibac\IdeaProjects\test-error-mismatch\src\lib.rs:9:19
|
9 | pub fn collect<T: Trait>() -> T {
| ----- required by this bound in `error_mismatch::collect`
= note: cannot satisfy `_: error_mismatch::Trait`
help: consider specifying the type argument in the function call
|
4 | let _ = collect::<T>();
| ^^^^^
Activity
estebank commentedon Dec 6, 2019
CC #53081
mibac138 commentedon May 5, 2020
I can reproduce this on 1.43, however I can't on nightly. I think this was fixed along with #53081 in #70642?
1.43 output
nightly 2020-04-27 output
estebank commentedon May 5, 2020
I think that is correct @mibac138.