Skip to content

Conversation

@sticnarf
Copy link
Contributor

@sticnarf sticnarf commented Mar 21, 2021

This PR should fix #7846. It mostly follows the instructions from @edwin0cheng in that issue.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
@sticnarf sticnarf force-pushed the include-child-mod branch from d9c34b9 to 3bb9efb Compare March 21, 2021 15:02
Copy link
Contributor

@edwin0cheng edwin0cheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM except a little nit

None => {
candidate_files.push(format!("{}{}.rs", self.dir_path.0, name));
candidate_files.push(format!("{}{}/mod.rs", self.dir_path.0, name));
if is_include_macro {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is is possible to move file_id.is_include_macro(db.upcast()); inside here , such that :

if file_id.is_include_macro(db.upcast()) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I moved it inside.

Signed-off-by: Yilin Chen <sticnarf@gmail.com>
@edwin0cheng
Copy link
Contributor

Thanks a lot !

bors r+

@bors
Copy link
Contributor

bors bot commented Mar 21, 2021

@bors bors bot merged commit 31ed164 into rust-lang:master Mar 21, 2021
@lnicola
Copy link
Member

lnicola commented Mar 21, 2021

changelog fix (first contribution) fix module resolution in include!ed files

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

Successfully merging this pull request may close these issues.

Include! macro behaviors differently between rust-analyzer and standard library

3 participants