-
Notifications
You must be signed in to change notification settings - Fork 1.9k
minor: Fix option_env expansion #13898
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
Conversation
| let expanded = match get_env_inner(db, arg_id, &key) { | ||
| None => quote! { #DOLLAR_CRATE::option::Option::None::<&str> }, | ||
| Some(s) => quote! { #DOLLAR_CRATE::option::Some(#s) }, | ||
| Some(s) => quote! { #DOLLAR_CRATE::option::Option::Some(#s) }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and is $crate really correct?
The option_env! macro is defined in core, so I would expect it to be.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we're not handling it correctly, then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Odd, we should be handling $crate for these properly 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we don't resolve it (see the three instances in version.rs), while it works with ::core::option::Option. I wonder if we don't already have an issue for something like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, I mean I am looking into rewriting the token map stuff (though I don't have a lot of time to put into r-a currently), and I imagine this will also require me to change how we handle $crate as this involves rewriting/adding hygiene proper handling. So that might fix it in the end as well.
|
@bors r+ |
|
☀️ Test successful - checks-actions |
1 similar comment
|
☀️ Test successful - checks-actions |
|
👀 Test was successful, but fast-forwarding failed: 422 Changes must be made through a pull request. |
No description provided.