about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2019-07-15 22:26:45 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2019-07-16 21:23:29 +0100
commita4a7bb9a3f72505efb6ca9856af45287c8685d5e (patch)
tree433025c0790fc5bc32537b7e2f83cfc76dc8e1b6 /src/test/ui
parent03178f31c461af42bb61815cc206443c5842ebe0 (diff)
downloadrust-a4a7bb9a3f72505efb6ca9856af45287c8685d5e.tar.gz
rust-a4a7bb9a3f72505efb6ca9856af45287c8685d5e.zip
Make pretty-expanded-hygiene a `ui` test
`normalize-stdout-test` removes the need for Make, and it can be updated
with `--bless` this way
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/hygiene/unpretty-debug.rs20
-rw-r--r--src/test/ui/hygiene/unpretty-debug.stdout15
2 files changed, 35 insertions, 0 deletions
diff --git a/src/test/ui/hygiene/unpretty-debug.rs b/src/test/ui/hygiene/unpretty-debug.rs
new file mode 100644
index 00000000000..6e936bb3d83
--- /dev/null
+++ b/src/test/ui/hygiene/unpretty-debug.rs
@@ -0,0 +1,20 @@
+// check-pass
+// compile-flags: -Zunpretty=expanded,hygiene
+
+// Don't break whenever Symbol numbering changes
+// normalize-stdout-test "\d+#" -> "0#"
+
+// minimal junk
+#![feature(no_core)]
+#![no_core]
+
+macro_rules! foo {
+    ($x: ident) => { y + $x }
+}
+
+fn bar() {
+    let x = 1;
+    foo!(x)
+}
+
+fn y() {}
diff --git a/src/test/ui/hygiene/unpretty-debug.stdout b/src/test/ui/hygiene/unpretty-debug.stdout
new file mode 100644
index 00000000000..beac4c17abf
--- /dev/null
+++ b/src/test/ui/hygiene/unpretty-debug.stdout
@@ -0,0 +1,15 @@
+// check-pass
+// compile-flags: -Zunpretty=expanded,hygiene
+
+// Don't break whenever Symbol numbering changes
+// normalize-stdout-test "\d+#" -> "0#"
+
+// minimal junk
+#![feature /* 0#0 */(no_core)]
+#![no_core /* 0#0 */]
+
+macro_rules! foo /* 0#0 */ { ($ x : ident) => { y + $ x } }
+
+fn bar /* 0#0 */() { let x /* 0#0 */ = 1; y /* 0#1 */ + x /* 0#0 */ }
+
+fn y /* 0#0 */() { }