about summary refs log tree commit diff
path: root/compiler/rustc_graphviz/src
diff options
context:
space:
mode:
authorJannis Christopher Köhl <mail@koehl.dev>2022-08-25 16:43:46 +0000
committerJannis Christopher Köhl <mail@koehl.dev>2022-11-07 10:35:08 +0100
commit4f9c30fb676482a5148f28c0728b5280246a9886 (patch)
tree55564521204033dbfceb6cffcdc04dfeac266546 /compiler/rustc_graphviz/src
parent9b735a7132acd58b3bd34c084e9ca5b4ca7450a2 (diff)
downloadrust-4f9c30fb676482a5148f28c0728b5280246a9886.tar.gz
rust-4f9c30fb676482a5148f28c0728b5280246a9886.zip
Add initial version of value analysis and dataflow constant propagation
Diffstat (limited to 'compiler/rustc_graphviz/src')
-rw-r--r--compiler/rustc_graphviz/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/rustc_graphviz/src/lib.rs b/compiler/rustc_graphviz/src/lib.rs
index 3c1bb553266..401d3f6689c 100644
--- a/compiler/rustc_graphviz/src/lib.rs
+++ b/compiler/rustc_graphviz/src/lib.rs
@@ -471,7 +471,11 @@ pub trait Labeller<'a> {
 /// Escape tags in such a way that it is suitable for inclusion in a
 /// Graphviz HTML label.
 pub fn escape_html(s: &str) -> String {
-    s.replace('&', "&amp;").replace('\"', "&quot;").replace('<', "&lt;").replace('>', "&gt;")
+    s.replace('&', "&amp;")
+        .replace('\"', "&quot;")
+        .replace('<', "&lt;")
+        .replace('>', "&gt;")
+        .replace('\n', "<br align=\"left\"/>")
 }
 
 impl<'a> LabelText<'a> {