about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEduard-Mihai Burtescu <edy.burt@gmail.com>2016-03-23 17:59:15 +0200
committerEduard-Mihai Burtescu <edy.burt@gmail.com>2016-03-23 17:59:15 +0200
commit46b2a99db35fc657eefd33d094d48c898a683b66 (patch)
treeb968fce2e966823507b0fa7affdfd494a0d40a6b /src/test
parent6b4b65afadbcb9ead821238080e914846ecdd925 (diff)
parent00a32b288442efdf219230147ddcb834827ce65d (diff)
downloadrust-46b2a99db35fc657eefd33d094d48c898a683b66.tar.gz
rust-46b2a99db35fc657eefd33d094d48c898a683b66.zip
Rollup merge of #32423 - mitaa:rdoc-vstruct-fields, r=alexcrichton
rustdoc: Omit `pub` for inlined variant-struct fields

fixes #32395

r? @alexcrichton
Diffstat (limited to 'src/test')
-rw-r--r--src/test/auxiliary/variant-struct.rs15
-rw-r--r--src/test/rustdoc/issue-32395.rs21
2 files changed, 36 insertions, 0 deletions
diff --git a/src/test/auxiliary/variant-struct.rs b/src/test/auxiliary/variant-struct.rs
new file mode 100644
index 00000000000..d846c0adf61
--- /dev/null
+++ b/src/test/auxiliary/variant-struct.rs
@@ -0,0 +1,15 @@
+// Copyright 2016 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.
+
+pub enum Foo {
+    Bar {
+        qux: (),
+    }
+}
diff --git a/src/test/rustdoc/issue-32395.rs b/src/test/rustdoc/issue-32395.rs
new file mode 100644
index 00000000000..fba2a6ad487
--- /dev/null
+++ b/src/test/rustdoc/issue-32395.rs
@@ -0,0 +1,21 @@
+// Copyright 2016 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.
+
+// aux-build:variant-struct.rs
+// build-aux-docs
+// ignore-cross-compile
+
+// @has variant_struct/enum.Foo.html
+// @!has - 'pub qux'
+extern crate variant_struct;
+
+// @has issue_32395/enum.Foo.html
+// @!has - 'pub qux'
+pub use variant_struct::Foo;