Skip to content

Reexporting types at a higher level doesn't work. #7780

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

Closed
mstewartgallus opened this issue Jul 13, 2013 · 4 comments
Closed

Reexporting types at a higher level doesn't work. #7780

mstewartgallus opened this issue Jul 13, 2013 · 4 comments

Comments

@mstewartgallus
Copy link
Contributor

Consider a module sync that's a module of the extra crate. Suppose one had sync.rs be the following (and there were appropriate file within the sync folder defining the submodules.)

pub use unlock::Unlock;
pub use arc::Arc;
pub use wait_queue::WaitQueue;
pub use condition::Condition;
pub use semaphore::Semaphore;

pub use mutex::Mutex;
pub use rwlock::RWLock;

pub use shared_mut::mutex_arc::MutexArc;
pub use shared_mut::rwarc::RWArc;

These types should be reexported as part of sync.

@huonw
Copy link
Member

huonw commented Jul 13, 2013

What is the error message? (Please try to include error messages in bug reports.)

You possible need pub use self::unlock::Unlock.

@mstewartgallus
Copy link
Contributor Author

I should have been more specific. There is no error when compiling the crate but only an error when trying to access the type from outside the crate. The type is not exported.

@huonw
Copy link
Member

huonw commented Jul 14, 2013

I see, is there some code that demonstrates this? (And what is the error message?)

@mstewartgallus
Copy link
Contributor Author

This was completely a stupid mistake on my end where I didn't edit the extra.rs file correctly.

flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 7, 2021
…ogiq

Revert `update_lints` module list generating code

This commit reverts the module list generation code to what it was
before the change to `include!` it and generates better output.

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants