about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-06-03 12:15:55 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2018-06-04 09:52:31 +0200
commitfb54a4afbcae8708b0158306c87cee31d7c01765 (patch)
tree6ebe2874f77c973959063f719a57167b6fe97088 /src
parent402aa0ff157d48175747812b594087deb027a151 (diff)
downloadrust-fb54a4afbcae8708b0158306c87cee31d7c01765.tar.gz
rust-fb54a4afbcae8708b0158306c87cee31d7c01765.zip
Add missing ui tests
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/feature-gate-doc_keyword.rs13
-rw-r--r--src/test/ui/feature-gate-doc_keyword.stderr11
2 files changed, 24 insertions, 0 deletions
diff --git a/src/test/ui/feature-gate-doc_keyword.rs b/src/test/ui/feature-gate-doc_keyword.rs
new file mode 100644
index 00000000000..2ff44626ccd
--- /dev/null
+++ b/src/test/ui/feature-gate-doc_keyword.rs
@@ -0,0 +1,13 @@
+// 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.
+
+#[doc(keyword = "match")] //~ ERROR: #[doc(keyword = "...")] is experimental
+/// wonderful
+mod foo{}
diff --git a/src/test/ui/feature-gate-doc_keyword.stderr b/src/test/ui/feature-gate-doc_keyword.stderr
new file mode 100644
index 00000000000..e4f5109afc3
--- /dev/null
+++ b/src/test/ui/feature-gate-doc_keyword.stderr
@@ -0,0 +1,11 @@
+error[E0658]: #[doc(keyword = "...")] is experimental (see issue #51315)
+  --> $DIR/feature-gate-doc_keyword.rs:11:1
+   |
+LL | #[doc(keyword = "match")] //~ ERROR: #[doc(keyword = "...")] is experimental
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: add #![feature(doc_keyword)] to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.