about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorQuietMisdreavus <grey@quietmisdreavus.net>2019-04-18 09:15:39 -0500
committerQuietMisdreavus <grey@quietmisdreavus.net>2019-05-06 15:20:18 -0500
commita6d26eb053e9c56fdc9d9e20a2952041a165e559 (patch)
treecc8d9f8b6cffc79694011dfe2795360f4cc7eaf1 /src/test/rustdoc
parente66e1c7186f027a17a0959d0e8f42367446217c1 (diff)
downloadrust-a6d26eb053e9c56fdc9d9e20a2952041a165e559.tar.gz
rust-a6d26eb053e9c56fdc9d9e20a2952041a165e559.zip
add test for `async move` in a doctest
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/async-move-doctest.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/rustdoc/async-move-doctest.rs b/src/test/rustdoc/async-move-doctest.rs
new file mode 100644
index 00000000000..42723132782
--- /dev/null
+++ b/src/test/rustdoc/async-move-doctest.rs
@@ -0,0 +1,14 @@
+// compile-flags:--test
+// edition:2018
+
+// prior to setting the default edition for the doctest pre-parser, this doctest would fail due to
+// a fatal parsing error
+// see https://github.com/rust-lang/rust/issues/59313
+
+//! ```
+//! #![feature(async_await)]
+//!
+//! fn foo() {
+//!     drop(async move {});
+//! }
+//! ```