On bin crates with both lib.rs and main.rs, recursion_limit hint is correct only for lib.rs #100262
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
On bin crates with both lib.rs and main.rs, when the compiler overflows evaluating the requirement of a type, it correctly prints an hint like
If you put it only on main.rs, the error message doesn't change at all, so the first thing the user will think it's the directive has been put on the wrong fiile.
Putting it only on lib.rs changes the error, that loses all the hints and becomes a really concise
At this point the user is lost, the solution is to put the directive on both main.rs and lib.rs, but it's not obvious, the compilerr should hint it
The text was updated successfully, but these errors were encountered: