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

Implement updated privacy rules #17660

Closed
brson opened this issue Sep 30, 2014 · 1 comment
Closed

Implement updated privacy rules #17660

brson opened this issue Sep 30, 2014 · 1 comment

Comments

@brson
Copy link
Contributor

brson commented Sep 30, 2014

I can't find a tracking issue for rust-lang/rfcs#200

@brson
Copy link
Contributor Author

brson commented Sep 30, 2014

This is done.

@brson brson closed this as completed Sep 30, 2014
lnicola pushed a commit to lnicola/rust that referenced this issue Jul 28, 2024
Fix more path resolution for included submodules

Now with more comprehensive testing! This adds tests for includes within modules. Previous testing was not comprehensive enough since submodules that use `include!` didn't actually work either! The `ModDir` used for resolving mods relative to included files has to be `ModDir::root()`. The original test just so happened to put the submodules in the root which made this work, but if you put the `include!` inside a `mod` block it didn't work.

With this change, when collecting a macro expansion, if the macro call is an `include!`, we use the `ModDir::root()` instead of the current module we're in.
RalfJung pushed a commit to RalfJung/rust that referenced this issue Aug 1, 2024
Fix more path resolution for included submodules

Now with more comprehensive testing! This adds tests for includes within modules. Previous testing was not comprehensive enough since submodules that use `include!` didn't actually work either! The `ModDir` used for resolving mods relative to included files has to be `ModDir::root()`. The original test just so happened to put the submodules in the root which made this work, but if you put the `include!` inside a `mod` block it didn't work.

With this change, when collecting a macro expansion, if the macro call is an `include!`, we use the `ModDir::root()` instead of the current module we're in.
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

1 participant