diff options
| author | Georg Brandl <georg@python.org> | 2016-05-09 16:48:02 +0200 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2016-05-09 16:50:47 +0200 |
| commit | 6100b70b98ee090c9b8e7b4788e4513e64fcc3ff (patch) | |
| tree | 7bacc5126f84300141ffdaa8022ef8467649af51 /src/librustdoc/clean | |
| parent | 50909f2d5036e59871f779500dd722a62421c13c (diff) | |
rustdoc: do not strip blanket impls in crate of origin
In `impl<T> Trait for T`, the blanket type parameters `T` were recognized as "local" and "not exported", so these impls were thrown out. Now we check if they are generic, and keep them in that case. Fixes: #29503
Diffstat (limited to 'src/librustdoc/clean')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index f5b8db1143e..a47b66bf2f7 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -1540,6 +1540,13 @@ impl Type { _ => None, } } + + pub fn is_generic(&self) -> bool { + match *self { + ResolvedPath { is_generic, .. } => is_generic, + _ => false, + } + } } impl GetDefId for Type { |
