-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
builtin_macros: expect raw strings too
`expr_to_string` allows raw strings through so this code should be expected to handle those. Signed-off-by: David Wood <[email protected]>
- Loading branch information
Showing
3 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// unset-rustc-env:oopsie | ||
|
||
env![r#"oopsie"#]; | ||
//~^ ERROR environment variable `oopsie` not defined at compile time | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error: environment variable `oopsie` not defined at compile time | ||
--> $DIR/builtin-env-issue-114010.rs:3:1 | ||
| | ||
LL | env![r#"oopsie"#]; | ||
| ^^^^^^^^^^^^^^^^^ | ||
| | ||
= help: use `std::env::var("oopsie")` to read the variable at run time | ||
= note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info) | ||
|
||
error: aborting due to previous error | ||
|