Skip to content

use let to bind value from a macro expression #3976

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

Merged
merged 1 commit into from
Jan 4, 2020

Conversation

tesuji
Copy link
Contributor

@tesuji tesuji commented Dec 21, 2019

It is recommended to do that as I could remember.

@tesuji tesuji closed this Dec 21, 2019
@tesuji tesuji reopened this Dec 21, 2019
@topecongiro topecongiro merged commit 0938d37 into rust-lang:master Jan 4, 2020
@tesuji tesuji deleted the let-macro-expr branch January 4, 2020 10:35
@ytmimi
Copy link
Contributor

ytmimi commented Apr 1, 2022

@calebcartwright I'm not sure if this needs to be backported. Maybe at the time it was recommended to use a let binding, but I don't know if that's the case anymore. Please correct me if I'm wrong. Also, Config::is_default (which is the method being modified here) is only used when testing.

It's an easy cherry-pick in case we do want to bring it into the 1.x branch, but I don't think it's something we necessarily need to do.

@calebcartwright
Copy link
Member

Agreed. It's simple enough but unless clippy is barking about it or we're experiencing issues I think we can focus on the rest of the backport backlog

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

Successfully merging this pull request may close these issues.

5 participants