diff options
| author | bohan <bohan-zhang@foxmail.com> | 2023-04-20 13:24:45 +0800 |
|---|---|---|
| committer | bohan <bohan-zhang@foxmail.com> | 2023-04-21 08:40:00 +0800 |
| commit | a2f275da511bbe03ca53bb4c90a344340b1c8fff (patch) | |
| tree | 53d2f0068f5cbfc80b9cb71ee2cfe107c81ddc38 /tests | |
| parent | 7908a1d65496b88626e4b7c193c81d777005d6f3 (diff) | |
| download | rust-a2f275da511bbe03ca53bb4c90a344340b1c8fff.tar.gz rust-a2f275da511bbe03ca53bb4c90a344340b1c8fff.zip | |
fix(error): normalize whitespace during msg_to_buffer
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/extenv/issue-110547.rs | 7 | ||||
| -rw-r--r-- | tests/ui/extenv/issue-110547.stderr | 29 |
2 files changed, 36 insertions, 0 deletions
diff --git a/tests/ui/extenv/issue-110547.rs b/tests/ui/extenv/issue-110547.rs new file mode 100644 index 00000000000..a6fb96ac066 --- /dev/null +++ b/tests/ui/extenv/issue-110547.rs @@ -0,0 +1,7 @@ +// compile-flags: -C debug-assertions + +fn main() { + env!{"\t"}; //~ ERROR not defined at compile time + env!("\t"); //~ ERROR not defined at compile time + env!("\u{2069}"); //~ ERROR not defined at compile time +} diff --git a/tests/ui/extenv/issue-110547.stderr b/tests/ui/extenv/issue-110547.stderr new file mode 100644 index 00000000000..1219630d346 --- /dev/null +++ b/tests/ui/extenv/issue-110547.stderr @@ -0,0 +1,29 @@ +error: environment variable ` ` not defined at compile time + --> $DIR/issue-110547.rs:4:5 + | +LL | env!{"\t"}; + | ^^^^^^^^^^ + | + = help: use `std::env::var(" ")` 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: environment variable ` ` not defined at compile time + --> $DIR/issue-110547.rs:5:5 + | +LL | env!("\t"); + | ^^^^^^^^^^ + | + = help: use `std::env::var(" ")` 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: environment variable `` not defined at compile time + --> $DIR/issue-110547.rs:6:5 + | +LL | env!("\u{2069}"); + | ^^^^^^^^^^^^^^^^ + | + = help: use `std::env::var("")` 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 3 previous errors + |
