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

Make syntax::expand::expand_syntax_ext return an option #2248

Closed
catamorphism opened this issue Apr 19, 2012 · 3 comments
Closed

Make syntax::expand::expand_syntax_ext return an option #2248

catamorphism opened this issue Apr 19, 2012 · 3 comments
Labels
A-syntaxext Area: Syntax extensions C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@catamorphism
Copy link
Contributor

Make syntax::expand::expand_syntax_ext return a Rust expr that has type option<str> where the string is non-empty, rather than an expr with type str (where the string may be empty), as per a FIXME.

@Aatch
Copy link
Contributor

Aatch commented Apr 29, 2013

I don't think this is valid any more (for one that path no longer exists). Re-open if it is.

@Aatch Aatch closed this as completed Apr 29, 2013
@alexcrichton
Copy link
Member

This looks like it's still present, it just moved to syntax::ext::env, you can find via git grep 2248 as well

@alexcrichton alexcrichton reopened this May 13, 2013
@emberian
Copy link
Member

Still relevant

bors added a commit that referenced this issue Aug 9, 2013
env! aborts compilation of the specified environment variable is not
defined and takes an optional second argument containing a custom
error message. option_env! creates an Option<&'static str> containing
the value of the environment variable.

There are no run-pass tests that check the behavior when the environment
variable is defined since the test framework doesn't support setting
environment variables at compile time as opposed to runtime. However,
both env! and option_env! are used inside of rustc itself, which should
act as a sufficient test.

Fixes #2248.
@bors bors closed this as completed in c3825c8 Aug 9, 2013
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
do not protect SRW items

This is the Miri version of rust-lang#98017.
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
I just noticed a regression on model-checking/kani#2227 where I incorrectly updated a test that should've caught this regression. Thus, fix the issue and revert the changes to the test.
BoxyUwU pushed a commit to BoxyUwU/rust that referenced this issue Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-syntaxext Area: Syntax extensions C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants