]> git.lizzy.rs Git - rust.git/commitdiff
Respond to PR comments.
authorridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com>
Wed, 25 May 2022 17:44:56 +0000 (10:44 -0700)
committerridwanabdillahi <91507758+ridwanabdillahi@users.noreply.github.com>
Wed, 25 May 2022 17:44:56 +0000 (10:44 -0700)
compiler/rustc_passes/src/debugger_visualizer.rs

index 9b9ee93f63d99a870e17e045478878a1bcab5742..e08683fe23b2019819cecd30edaef55b8f0b1307 100644 (file)
@@ -54,7 +54,14 @@ fn check_for_debugger_visualizer<'tcx>(
                     debugger_visualizers
                         .insert(DebuggerVisualizerFile::new(Arc::from(contents), visualizer_type));
                 }
-                _ => {}
+                Err(err) => {
+                    tcx.sess
+                        .struct_span_err(
+                            meta_item.span,
+                            &format!("couldn't read {}: {}", file.display(), err),
+                        )
+                        .emit();
+                }
             }
         }
     }