From fb54a4afbcae8708b0158306c87cee31d7c01765 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sun, 3 Jun 2018 12:15:55 +0200 Subject: [PATCH] Add missing ui tests --- src/test/ui/feature-gate-doc_keyword.rs | 13 +++++++++++++ src/test/ui/feature-gate-doc_keyword.stderr | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 src/test/ui/feature-gate-doc_keyword.rs create mode 100644 src/test/ui/feature-gate-doc_keyword.stderr 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 000000000000..2ff44626ccd0 --- /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 or the MIT license +// , 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 000000000000..e4f5109afc3e --- /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`.