Skip to content

Commit 3eddb29

Browse files
committed
Add <meta charset="utf-8"> to -Zdump-mir-spanview output
1 parent 670a0ed commit 3eddb29

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

compiler/rustc_middle/src/mir/spanview.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ const ANNOTATION_LEFT_BRACKET: char = '\u{298a}'; // Unicode `Z NOTATION RIGHT B
1515
const ANNOTATION_RIGHT_BRACKET: char = '\u{2989}'; // Unicode `Z NOTATION LEFT BINDING BRACKET`
1616
const NEW_LINE_SPAN: &str = "</span>\n<span class=\"line\">";
1717
const HEADER: &str = r#"<!DOCTYPE html>
18-
<html>
19-
<head>"#;
18+
<html lang="en">
19+
<head>
20+
<meta charset="utf-8">"#;
2021
const START_BODY: &str = r#"</head>
2122
<body>"#;
2223
const FOOTER: &str = r#"</body>

tests/mir-opt/spanview_block.main.built.after.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33
<head>
4+
<meta charset="utf-8">
45
<title>spanview_block.main.built.after</title>
56
<style>
67
.line {

tests/mir-opt/spanview_statement.main.built.after.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33
<head>
4+
<meta charset="utf-8">
45
<title>spanview_statement.main.built.after</title>
56
<style>
67
.line {

tests/mir-opt/spanview_terminator.main.built.after.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="en">
33
<head>
4+
<meta charset="utf-8">
45
<title>spanview_terminator.main.built.after</title>
56
<style>
67
.line {

0 commit comments

Comments
 (0)