about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorOliver Middleton <olliemail27@gmail.com>2018-01-23 01:04:24 +0000
committerOliver Middleton <olliemail27@gmail.com>2018-01-23 01:04:24 +0000
commit04a884726a5a332aefd0af96c8d702b0830e5375 (patch)
tree231a26451a2f38c7aa082264e5cc5515d0bb828f /src/test/rustdoc
parentfdc18b3067b5bad257ccbe7400e3c4fb617e9e18 (diff)
downloadrust-04a884726a5a332aefd0af96c8d702b0830e5375.tar.gz
rust-04a884726a5a332aefd0af96c8d702b0830e5375.zip
rustdoc: Show when traits are auto traits
Diffstat (limited to 'src/test/rustdoc')
-rw-r--r--src/test/rustdoc/auto-traits.rs23
-rw-r--r--src/test/rustdoc/auxiliary/auto-traits.rs13
2 files changed, 36 insertions, 0 deletions
diff --git a/src/test/rustdoc/auto-traits.rs b/src/test/rustdoc/auto-traits.rs
new file mode 100644
index 00000000000..1753c0ebf73
--- /dev/null
+++ b/src/test/rustdoc/auto-traits.rs
@@ -0,0 +1,23 @@
+// 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.
+
+// aux-build:auto-traits.rs
+
+#![feature(optin_builtin_traits)]
+
+#![crate_name = "foo"]
+
+extern crate auto_traits;
+
+// @has 'foo/trait.Foo.html' '//pre' 'pub unsafe auto trait Foo'
+pub unsafe auto trait Foo {}
+
+// @has 'foo/trait.Bar.html' '//pre' 'pub unsafe auto trait Bar'
+pub use auto_traits::Bar;
diff --git a/src/test/rustdoc/auxiliary/auto-traits.rs b/src/test/rustdoc/auxiliary/auto-traits.rs
new file mode 100644
index 00000000000..70299334b46
--- /dev/null
+++ b/src/test/rustdoc/auxiliary/auto-traits.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.
+
+#![feature(optin_builtin_traits)]
+
+pub unsafe auto trait Bar {}