diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-07-19 16:39:20 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2020-07-19 16:39:20 -0400 |
| commit | e24a0172b0df21b0bc17f3c9a16773d8889dd2b1 (patch) | |
| tree | bcf322e0b23754b0957267ddaf1e4cdaba52d362 /src/test/rustdoc | |
| parent | d7f94516345a36ddfcd68cbdf1df835d356795c3 (diff) | |
Only skip impls of foreign unstable traits
Previously unstable impls were skipped, which meant that any impl with an unstable method would get skipped.
Diffstat (limited to 'src/test/rustdoc')
| -rw-r--r-- | src/test/rustdoc/auxiliary/unstable-trait.rs | 26 | ||||
| -rw-r--r-- | src/test/rustdoc/hide-unstable-trait.rs | 11 |
2 files changed, 37 insertions, 0 deletions
diff --git a/src/test/rustdoc/auxiliary/unstable-trait.rs b/src/test/rustdoc/auxiliary/unstable-trait.rs new file mode 100644 index 00000000000..6f06a6e2656 --- /dev/null +++ b/src/test/rustdoc/auxiliary/unstable-trait.rs @@ -0,0 +1,26 @@ +#![feature(staged_api)] +#![stable(feature = "private_general", since = "1.0.0")] + +#[unstable(feature = "private_trait", issue = "none")] +pub trait Bar {} + +#[stable(feature = "private_general", since = "1.0.0")] +pub struct Foo { + // nothing +} + +impl Foo { + #[stable(feature = "private_general", since = "1.0.0")] + pub fn stable_impl() {} +} + +impl Foo { + #[unstable(feature = "private_trait", issue = "none")] + pub fn bar() {} + + #[stable(feature = "private_general", since = "1.0.0")] + pub fn bar2() {} +} + +#[stable(feature = "private_general", since = "1.0.0")] +impl Bar for Foo {} diff --git a/src/test/rustdoc/hide-unstable-trait.rs b/src/test/rustdoc/hide-unstable-trait.rs new file mode 100644 index 00000000000..c30d6ed7b52 --- /dev/null +++ b/src/test/rustdoc/hide-unstable-trait.rs @@ -0,0 +1,11 @@ +// aux-build:unstable-trait.rs + +#![crate_name = "foo"] +#![feature(private_trait)] + +extern crate unstable_trait; + +// @has foo/struct.Foo.html 'bar' +// @has foo/struct.Foo.html 'bar2' +#[doc(inline)] +pub use unstable_trait::Foo; |
