-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
pub use with names that conflict with standard prelude behave incorrectly #14082
Comments
Nominating, resolve bugs like this are normally nasty to fix after-the-fact. |
cc me |
2 similar comments
cc me |
cc me |
assigning P-high, 1.0 |
alexcrichton
added a commit
to alexcrichton/rust
that referenced
this issue
May 15, 2014
The reexport didn't switch the privacy, so the reexport was actually considered private, erroneously failing to resolve imports later on. Closes rust-lang#14082
bors
added a commit
that referenced
this issue
May 17, 2014
The reexport didn't switch the privacy, so the reexport was actually considered private, erroneously failing to resolve imports later on. Closes #14082
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 13, 2023
…ykril fix: support non-ascii characters in case conversion Fixes rust-lang#13521 (the attribute problem is tracked in another issue, as commented) Note that other functions like `to_camel_case()` and `is_lower_snake_case()` already handle non-ascii characters.
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Feb 6, 2025
close rust-lang#13856 changelog: [`manual_slice_fill`]: new lint
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Let's say I've got the following module architecture, where I define in a sub-module a struct named
GC
that I wand to use from another sub-module. Becausem
is private, I use apub use
to make it availableThe error message for this is absolutely weird :
This bugs happens whenever the item I try to re-export is named like an item in the Prelude, say,
GC
,Vec
, etc. but as long as I change it to something completely arbitrary, sayFoo
, it works as expected.I don't know if it's intended that it's impossible to "re-export" with
pub use
names that are already in the prelude. I suspect it's not, but even if its, the error message is really not helpful, since it only points the place where the re-export is actually used, and not thepub use
itself. But it should definitively be possible to override names in the prelude, I think. It's possible with "normal"use
statements, so why notpub use
?Also, I found this bug updating an old code base that was written something like 5-6 months ago (Rust was in 0.9 back then I believe), so I'm not absolutely sure but as this code hasn't changed except the changes I made to update it, I suspect that this worked before.
The text was updated successfully, but these errors were encountered: