From 458102eefa0cf8fc3f33928ab90a86ac4c564f90 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 6 Apr 2015 15:10:55 -0700 Subject: rustdoc: Run external traits through filters This ensures that all external traits are run through the same filters that the rest of the AST goes through, stripping hidden function as necessary. Closes #13698 --- src/test/rustdoc/issue-13698.rs | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/test/rustdoc/issue-13698.rs (limited to 'src/test/rustdoc') diff --git a/src/test/rustdoc/issue-13698.rs b/src/test/rustdoc/issue-13698.rs new file mode 100644 index 00000000000..81cee0998ab --- /dev/null +++ b/src/test/rustdoc/issue-13698.rs @@ -0,0 +1,25 @@ +// Copyright 2015 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:issue-13698.rs + +extern crate issue_13698; + +pub struct Foo; +// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn foo' +impl issue_13698::Foo for Foo {} + +pub trait Bar { + #[doc(hidden)] + fn bar(&self) {} +} + +// @!has issue_13698/struct.Foo.html '//*[@id="method.foo"]' 'fn bar' +impl Bar for Foo {} -- cgit 1.4.1-3-g733a5