about summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/messages.ftl
diff options
context:
space:
mode:
authorDavid Wood <david.wood@huawei.com>2023-07-25 11:12:52 +0100
committerDavid Wood <david.wood@huawei.com>2023-07-25 11:12:52 +0100
commit75df62d4a2c45175b8cb1eb4bdc10fa423c11c4c (patch)
tree67925908692c640333197f19df25fffd2a76bb9f /compiler/rustc_builtin_macros/messages.ftl
parentc06a7eb2a6dcbc7649de76472f6845e30f2fb97f (diff)
downloadrust-75df62d4a2c45175b8cb1eb4bdc10fa423c11c4c.tar.gz
rust-75df62d4a2c45175b8cb1eb4bdc10fa423c11c4c.zip
builtin_macros: raw str in diagnostic output
If a raw string was used in the `env!` invocation, then it should also
be shown in the diagnostic messages as a raw string.

Signed-off-by: David Wood <david@davidtw.co>
Diffstat (limited to 'compiler/rustc_builtin_macros/messages.ftl')
-rw-r--r--compiler/rustc_builtin_macros/messages.ftl4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_builtin_macros/messages.ftl b/compiler/rustc_builtin_macros/messages.ftl
index 322222ae330..79fae7f92f1 100644
--- a/compiler/rustc_builtin_macros/messages.ftl
+++ b/compiler/rustc_builtin_macros/messages.ftl
@@ -109,8 +109,8 @@ builtin_macros_derive_path_args_value = traits in `#[derive(...)]` don't accept
     .suggestion = remove the value
 
 builtin_macros_env_not_defined = environment variable `{$var}` not defined at compile time
-    .cargo = Cargo sets build script variables at run time. Use `std::env::var("{$var}")` instead
-    .other = use `std::env::var("{$var}")` to read the variable at run time
+    .cargo = Cargo sets build script variables at run time. Use `std::env::var({$var_expr})` instead
+    .custom = use `std::env::var({$var_expr})` to read the variable at run time
 
 builtin_macros_env_takes_args = `env!()` takes 1 or 2 arguments