about summary refs log tree commit diff
path: root/src/test/rustdoc
diff options
context:
space:
mode:
authorkennytm <kennytm@gmail.com>2018-01-23 17:03:47 +0800
committerkennytm <kennytm@gmail.com>2018-01-23 22:31:02 +0800
commit9707b3107612599f8f96facdcd8959669b630e02 (patch)
tree41e6ac8a5d5d2e44cf770d11cb99118bacfa5b08 /src/test/rustdoc
parent97358644a027696531e85949581023759c133ddd (diff)
parent04a884726a5a332aefd0af96c8d702b0830e5375 (diff)
downloadrust-9707b3107612599f8f96facdcd8959669b630e02.tar.gz
rust-9707b3107612599f8f96facdcd8959669b630e02.zip
Rollup merge of #47672 - ollie27:rustdoc_auto_traits, r=GuillaumeGomez
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 {}