-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Confusing error when using import globbing in test module #16597
Comments
This partially alleviates the confusing behavior in issue rust-lang#16597
Is using For anyone wishing to temporarily work around this issue, you can re-enable import shadowing with the following feature gate |
The error message really should mention that that gate is an option. |
The gate will probably be removed in the future, so I'd rather not encourage people to depend on it. |
@samdoshi it's just a bug. Should be an easy-ish fix by gensyming each |
@sfackler what’s gensyming? Symbol generation, as in giving them different names? |
Yeah, giving each reexport module a name that the compiler will consider distinct from everything else in the crate. |
rust-lang/rust#16597 Name conflicts when globbing are affected by a problem in __test_reexports gensym.
This partially alleviates the confusing behavior in issue #16597
…ckler Fixes #16597 I'm not 100% sure this is the correct way to handle this - but I wasn't able to find a better way without doing way more refactoring of the code that I was comfortable with. Comments and criticism are appreciated 😄
internal: Sync from downstream
Problem
Using import globbing in a test module results in a very confusing error.
Code
Output
After some digging, it turns out the conflict is on
__test_reexports
. I plan to submit a PR to at least print the name of the conflicting import in the above error message so there's something to go on.The text was updated successfully, but these errors were encountered: