Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
658ea38
rustc_llvm: remove stale references
tamird Nov 26, 2017
9067d97
rustc_llvm: use cc::Build::define
tamird Nov 26, 2017
94d02b8
*: strip calls to cc::Build::compile
tamird Nov 26, 2017
c00ba79
Invert colors in important traits tooltip
GuillaumeGomez Nov 29, 2017
326eb79
rustbuild: Fix a typo with the Cargo book
alexcrichton Nov 29, 2017
21228a8
Remove librustdoc dependency on env_logger
Aaron1011 Nov 29, 2017
91a4106
Fix rustoc item summaries that are headers
chrisduerr Nov 29, 2017
2544b9f
Update Cargo to Wed Nov 29 15:19:05 2017 +0000
SimonSapin Nov 29, 2017
5a00b7c
make coercions to `!` in unreachable code a hard error
arielb1 Nov 8, 2017
666bb90
wasm: Update LLVM to fix a test
alexcrichton Nov 29, 2017
780f4ed
incr.comp.: Make traits::VTable encodable and decodable.
michaelwoerister Nov 30, 2017
4e74eb5
rustc: Filter out bogus extern crate warnings
alexcrichton Nov 30, 2017
ccef969
NetBSD: add sysctl backend for std::env::current_exe
jakllsch Nov 29, 2017
ec337b6
Show hidden items with rustdoc's document-private
chrisduerr Nov 30, 2017
1df13c0
Hide trait impl with private trait type parameter
chrisduerr Nov 30, 2017
5f47c7f
Fix htmldocck naming
chrisduerr Nov 30, 2017
f2df1f5
build_helper: destination file can't be up to date when not exists
Dec 1, 2017
95f465d
Rollup merge of #45880 - arielb1:never-coerce, r=nikomatsakis
kennytm Dec 1, 2017
263eb4d
Rollup merge of #46280 - tamird:remove-old-refs, r=alexcrichton
kennytm Dec 1, 2017
9493d4b
Rollup merge of #46373 - jakllsch:netbsd-kern_proc_pathname, r=kennytm
kennytm Dec 1, 2017
613da5c
Rollup merge of #46376 - SimonSapin:cargoup, r=kennytm
kennytm Dec 1, 2017
2341f6c
Rollup merge of #46385 - alexcrichton:fix-cargo-book, r=Mark-Simulacrum
kennytm Dec 1, 2017
ae24366
Rollup merge of #46386 - Aaron1011:fix_rustdoc_log, r=Mark-Simulacrum
kennytm Dec 1, 2017
bc8e8fa
Rollup merge of #46387 - chrisduerr:master, r=QuietMisdreavus
kennytm Dec 1, 2017
edaec07
Rollup merge of #46392 - GuillaumeGomez:fix-tooltip, r=QuietMisdreavus
kennytm Dec 1, 2017
b86a47f
Rollup merge of #46400 - michaelwoerister:vtable-encodable, r=eddyb
kennytm Dec 1, 2017
bd5a4af
Rollup merge of #46401 - alexcrichton:wasm-tests, r=arielb1
kennytm Dec 1, 2017
3f99b7c
Rollup merge of #46405 - alexcrichton:fix-rustdoc, r=estebank
kennytm Dec 1, 2017
662f902
Rollup merge of #46412 - chrisduerr:issue-46380, r=QuietMisdreavus
kennytm Dec 1, 2017
5617477
Rollup merge of #46421 - mnd:fix-build-for-guix, r=alexcrichton
kennytm Dec 1, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hide trait impl with private trait type parameter
Trait's implementations with private type parameters were displayed in
the implementing struct's documentation until now.

With this change any trait implementation that uses a private type
parameter is now hidden in the docs.
  • Loading branch information
chrisduerr committed Nov 30, 2017
commit 1df13c057a7f1937170fe600d24256f0bf943ec2
9 changes: 9 additions & 0 deletions src/librustdoc/passes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,15 @@ impl<'a> fold::DocFolder for ImplStripper<'a> {
return None;
}
}
if let Some(generics) = imp.trait_.as_ref().and_then(|t| t.generics()) {
for typaram in generics {
if let Some(did) = typaram.def_id() {
if did.is_local() && !self.retained.contains(&did) {
return None;
}
}
}
}
}
self.fold_item_recur(i)
}
Expand Down
19 changes: 19 additions & 0 deletions src/test/rustdoc/issue-46380-2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// 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 <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.

pub trait PublicTrait<T> {}

// @has issue_46380_2/struct.Public.html
pub struct PublicStruct;

// @!has - '//*[@class="impl"]' 'impl Add<Private> for Public'
impl PublicTrait<PrivateStruct> for PublicStruct {}

struct PrivateStruct;