-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Use unqualified names in type errors when possible #19792
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
Comments
What if the user imports a name using |
I'm not sure. There are a few options:
I think (1) and (3) are too ambiguous. My preference is (2). But something like this is still unacceptable:
If two distinct types would have the same unqualified name in a given error message, at least one of them must be printed qualified. Actually, do we want this to hold over the entirety of type errors printed by rustc in a given run? |
Triage: no change. |
Duplicate of #21934 |
…it-impl-indent fix: ide-assists, generate mut trait impl indent
…it-impl-indent fix: ide-assists, generate mut trait impl indent
would be much more readable as
One possibility is to use the names in scope where the type error appears. In any event, we should make sure none of the unqualified names in a given error are ambiguous.
The text was updated successfully, but these errors were encountered: