File tree 3 files changed +37
-0
lines changed
compiler/rustc_errors/src
3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -1336,6 +1336,7 @@ impl EmitterWriter {
1336
1336
// see?
1337
1337
for ( text, style) in msg. iter ( ) {
1338
1338
let text = self . translate_message ( text, args) . map_err ( Report :: new) . unwrap ( ) ;
1339
+ let text = & normalize_whitespace ( & text) ;
1339
1340
let lines = text. split ( '\n' ) . collect :: < Vec < _ > > ( ) ;
1340
1341
if lines. len ( ) > 1 {
1341
1342
for ( i, line) in lines. iter ( ) . enumerate ( ) {
Original file line number Diff line number Diff line change
1
+ // compile-flags: -C debug-assertions
2
+
3
+ fn main ( ) {
4
+ env ! { "\t " } ; //~ ERROR not defined at compile time
5
+ env ! ( "\t " ) ; //~ ERROR not defined at compile time
6
+ env ! ( "\u{2069} " ) ; //~ ERROR not defined at compile time
7
+ }
Original file line number Diff line number Diff line change
1
+ error: environment variable ` ` not defined at compile time
2
+ --> $DIR/issue-110547.rs:4:5
3
+ |
4
+ LL | env!{"\t"};
5
+ | ^^^^^^^^^^
6
+ |
7
+ = help: use `std::env::var(" ")` to read the variable at run time
8
+ = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
9
+
10
+ error: environment variable ` ` not defined at compile time
11
+ --> $DIR/issue-110547.rs:5:5
12
+ |
13
+ LL | env!("\t");
14
+ | ^^^^^^^^^^
15
+ |
16
+ = help: use `std::env::var(" ")` to read the variable at run time
17
+ = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
18
+
19
+ error: environment variable `` not defined at compile time
20
+ --> $DIR/issue-110547.rs:6:5
21
+ |
22
+ LL | env!("\u{2069}");
23
+ | ^^^^^^^^^^^^^^^^
24
+ |
25
+ = help: use `std::env::var("")` to read the variable at run time
26
+ = note: this error originates in the macro `env` (in Nightly builds, run with -Z macro-backtrace for more info)
27
+
28
+ error: aborting due to 3 previous errors
29
+
You can’t perform that action at this time.
0 commit comments