diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2015-01-12 10:24:19 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2015-01-28 05:15:24 -0500 |
| commit | ac94ae5883dd4efecebd9b5fece770910637b988 (patch) | |
| tree | faace06b2b86ffee6482d75b10a5c15bc4c28266 /src | |
| parent | 7bd19112ee30925b636ebbe26de9e043b47cb67f (diff) | |
| download | rust-ac94ae5883dd4efecebd9b5fece770910637b988.tar.gz rust-ac94ae5883dd4efecebd9b5fece770910637b988.zip | |
Update Rustdoc to deal with the Fn return type being an associated type.
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index c12726c8868..d2080419469 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -536,7 +536,7 @@ fn external_path_params(cx: &DocContext, trait_did: Option<ast::DefId>, match (trait_did, cx.tcx_opt()) { // Attempt to sugar an external path like Fn<(A, B,), C> to Fn(A, B) -> C (Some(did), Some(ref tcx)) if tcx.lang_items.fn_trait_kind(did).is_some() => { - assert_eq!(types.len(), 2); + assert_eq!(types.len(), 1); let inputs = match types[0].sty { sty::ty_tup(ref tys) => tys.iter().map(|t| t.clean(cx)).collect(), _ => { @@ -547,10 +547,12 @@ fn external_path_params(cx: &DocContext, trait_did: Option<ast::DefId>, } } }; - let output = match types[1].sty { - sty::ty_tup(ref v) if v.is_empty() => None, // -> () - _ => Some(types[1].clean(cx)) - }; + let output = None; + // FIXME(#20299) return type comes from a projection now + // match types[1].sty { + // sty::ty_tup(ref v) if v.is_empty() => None, // -> () + // _ => Some(types[1].clean(cx)) + // }; PathParameters::Parenthesized { inputs: inputs, output: output |
