Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use simpler abbreviations when reporting error types #105322

Open
sophiajt opened this issue Dec 5, 2022 · 1 comment
Open

Use simpler abbreviations when reporting error types #105322

sophiajt opened this issue Dec 5, 2022 · 1 comment
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.

Comments

@sophiajt
Copy link
Contributor

sophiajt commented Dec 5, 2022

Given the following code:

image

Ideally the output should look like:

Rather than printing the full types to the user, perhaps we want to have a kind of type abbreviation for readability.

The closure type [closure@f52.rs:13:18 13:21] is not one the user can type in, nor likely one they'll even track down in the source code. We could potentially just say closure (and specify it is unique in some way)

For the std::slice::Iter, I wonder if this is some we might abbreviate for readability. Granted Iter by itself is ambiguous, but perhaps there's a simpler way we could write this to allow more space for other information to the user.

@sophiajt sophiajt added 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. labels Dec 5, 2022
@RodBurman
Copy link

I am not sure I agree with this and certainly think that retrieving full names should be possible when/if the change is made, maybe via --verbose (or another switch?), alternatively --abbreviate to switch into the short form mode. Also [closure@f52.rs:13:18 13:21] presumably indicates the closure at character 18 on line 13 in file f52.rs? Which is quite simple and helpful at finding the problem, though I have no idea what 13:21 is (the time of compilation?). Anyway that is my 2 pennyworth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants