From 04a884726a5a332aefd0af96c8d702b0830e5375 Mon Sep 17 00:00:00 2001 From: Oliver Middleton Date: Tue, 23 Jan 2018 01:04:24 +0000 Subject: rustdoc: Show when traits are auto traits --- src/test/rustdoc/auto-traits.rs | 23 +++++++++++++++++++++++ src/test/rustdoc/auxiliary/auto-traits.rs | 13 +++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/test/rustdoc/auto-traits.rs create mode 100644 src/test/rustdoc/auxiliary/auto-traits.rs (limited to 'src/test/rustdoc') 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 or the MIT license +// , 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 or the MIT license +// , 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 {} -- cgit 1.4.1-3-g733a5