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

Fix "::::" appearing in module_path!() #19262

Merged
merged 2 commits into from
Nov 26, 2014
Merged

Fix "::::" appearing in module_path!() #19262

merged 2 commits into from
Nov 26, 2014

Conversation

murarth
Copy link
Contributor

@murarth murarth commented Nov 24, 2014

Closes #18859

fld.cx.mod_push(it.ident);
if it.ident.name != parse::token::special_idents::invalid.name {
fld.cx.mod_push(it.ident);
}
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't the mod_pop underneath this also be conditional? (is this why the unwrap above was removed?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that's why the unwrap was removed. I suppose they could both be conditional. I was thinking a pop function returning an Option (and letting the caller deal with it) instead of unwrapping it made some sense, but now I realize that mod_pop doesn't return anything. This function is the only place mod_push and mod_pop are used, so it's not breaking any code elsewhere. Still, I can make the change for the sake of it making more sense at a glance.

bors added a commit that referenced this pull request Nov 26, 2014
@bors bors closed this Nov 26, 2014
@bors bors merged commit 6a5fc50 into rust-lang:master Nov 26, 2014
@murarth murarth deleted the module-path-fix branch November 26, 2014 17:46
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.

logs showing module path with a quadruple colons (::::)
3 participants