summaryrefslogtreecommitdiffstats
path: root/src/test/pretty/attr-fn-inner.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/pretty/attr-fn-inner.rs')
-rw-r--r--src/test/pretty/attr-fn-inner.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/pretty/attr-fn-inner.rs b/src/test/pretty/attr-fn-inner.rs
new file mode 100644
index 000000000..6d9cb89f0
--- /dev/null
+++ b/src/test/pretty/attr-fn-inner.rs
@@ -0,0 +1,16 @@
+// Testing that both the inner item and next outer item are
+// preserved, and that the first outer item parsed in main is not
+// accidentally carried over to each inner function
+
+// pp-exact
+
+#![feature(rustc_attrs)]
+
+fn main() {
+ #![rustc_dummy]
+ #[rustc_dummy]
+ fn f() {}
+
+ #[rustc_dummy]
+ fn g() {}
+}