-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Super-weird compiler bug, and seemingly paradox behaviour when using non-absolute imports in 1.30 #55897
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
Comments
Actually the case is much more complex:
Seems like this one is resolving the env! correctly
** NOW THE SAME WITH NON_EXISTING_ENV_VAR **
This one seems to try to resolve the invalid env var, and reports an error that it doesn't find it. BUT! It also tries to include src/0/data.rs?!!!
*** If the src/false/data.rs is created, they give a different result! ***
Seems like it did determine the file exists, but then also said env doesn't exist in std?! *** If the src/0/data.rs is created, it doesn't complain about the prelude anymore,
|
Removing the |
A user of LALRPOP ran into a similiar issue when the build script was in the wrong directory (and so no For |
Fixed in #57205 |
Improve error recovery for some built-in macros Fixes #55897
Repro repo: https://github.com/axos88/out_dir_bug/blob/master/src/foo.rs#L1
Apparently that line causes
env!("whatever")
to resolve to "false", so theinclude!
fails, because it cannot find the file.I'm a bit baffled on why this doesn't create a more meaningful compile error. Seems like it gets confused due to there being a module named
env
and a macro namedenv!
in std?By completing that line to std::env, it will compile fine.
The text was updated successfully, but these errors were encountered: