about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-07-17 18:16:09 +0800
committerkennytm <kennytm@gmail.com>2018-07-17 19:24:57 +0800
commitc0db1aafeade826d37db3ca85087bbe349b45e9c (patch)
tree5fa2dfd62965b3d123b797c823915ed013a9e901 /src/test/rustdoc
parentc052a491f15c917bd8a7b65983ecb422ef529ea4 (diff)
parent65e6b2b4a8f01e453e2bc27df9e0f0666904af42 (diff)
Rollup merge of #52385 - GuillaumeGomez:pass-edition-to-parser, r=QuietMisdreavus
Pass edition flags to compiler from rustdoc as expected

Fixes #52357.
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/edition-flag.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/rustdoc/edition-flag.rs b/src/test/rustdoc/edition-flag.rs
new file mode 100644
index 00000000000..3475b657d25
--- /dev/null
+++ b/src/test/rustdoc/edition-flag.rs
@@ -0,0 +1,24 @@
+// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+// compile-flags:--test -Z unstable-options
+// edition:2018
+
+#![feature(async_await)]
+
+/// ```rust
+/// #![feature(async_await)]
+/// fn main() {
+///     let _ = async { };
+/// }
+/// ```
+fn main() {
+    let _ = async { };
+}