File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,7 +228,6 @@ impl Diagnostic {
228228 }
229229}
230230
231- #[ cfg( not( target_arch = "wasm32" ) ) ]
232231impl Diagnostic {
233232 /* rustc-style multi-line render with source preview and caret:
234233
@@ -268,8 +267,7 @@ impl Diagnostic {
268267}
269268
270269impl Diagnostic {
271- /* Compact one-line render: `path:line:col: msg`. No source preview.
272- Used by WASM (host renders preview) and by tests. */
270+ /* Compact one-line render: `path:line:col: msg`. No source preview. Used by tests. */
273271 pub fn render_oneline ( & self , src : & str , path : Option < & str > ) -> alloc:: string:: String {
274272 use crate :: s;
275273 let ( line, col) = Self :: line_col ( src, self . start ) ;
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ mod runtime {
4545 let mut s = String :: new ( ) ;
4646 for ( i, e) in errs. iter ( ) . enumerate ( ) {
4747 if i > 0 { s. push ( '\n' ) ; }
48- s. push_str ( & s ! ( "syntax error at " , str & e . render_oneline ( src, None ) ) ) ;
48+ s. push_str ( & e . render ( src, None ) ) ;
4949 }
5050 s
5151 } else {
You can’t perform that action at this time.
0 commit comments