]> git.lizzy.rs Git - rust.git/commitdiff
Add missing ui tests
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Sun, 3 Jun 2018 10:15:55 +0000 (12:15 +0200)
committerGuillaume Gomez <guillaume1.gomez@gmail.com>
Mon, 4 Jun 2018 07:52:31 +0000 (09:52 +0200)
src/test/ui/feature-gate-doc_keyword.rs [new file with mode: 0644]
src/test/ui/feature-gate-doc_keyword.stderr [new file with mode: 0644]

diff --git a/src/test/ui/feature-gate-doc_keyword.rs b/src/test/ui/feature-gate-doc_keyword.rs
new file mode 100644 (file)
index 0000000..2ff4462
--- /dev/null
@@ -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 (file)
index 0000000..e4f5109
--- /dev/null
@@ -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`.