diff options
| author | Mahdi Dibaiee <mdibaiee@pm.me> | 2022-01-03 18:08:19 +0000 |
|---|---|---|
| committer | Mahdi Dibaiee <mdibaiee@pm.me> | 2022-01-05 08:04:42 +0000 |
| commit | 973cf632d37b55095d1ff47b62de43c1864c4115 (patch) | |
| tree | caa6c165402068553f5f893a96693d63ee54ee81 /src | |
| parent | 19419f3771cf5478be137643d2f8a967f6ef088d (diff) | |
| download | rust-973cf632d37b55095d1ff47b62de43c1864c4115.tar.gz rust-973cf632d37b55095d1ff47b62de43c1864c4115.zip | |
Remove unsupported types in primitive_to_ty conversion, add FIXME note
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/passes/collect_intra_doc_links.rs | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs index 680a74e5aa6..79530086282 100644 --- a/src/librustdoc/passes/collect_intra_doc_links.rs +++ b/src/librustdoc/passes/collect_intra_doc_links.rs @@ -625,6 +625,9 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { use PrimitiveType::*; let tcx = self.cx.tcx; + // FIXME: Only simple types are supported here, see if we can support + // other types such as Tuple, Array, Slice, etc. + // See https://github.com/rust-lang/rust/issues/90703#issuecomment-1004263455 Some(tcx.mk_ty(match prim { Bool => ty::Bool, Str => ty::Str, @@ -644,14 +647,6 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> { U64 => ty::Uint(ty::UintTy::U64), U128 => ty::Uint(ty::UintTy::U128), Usize => ty::Uint(ty::UintTy::Usize), - //ty::Tuple(tys) if tys.is_empty() => Res::Primitive(Unit), - //ty::Tuple(_) => Res::Primitive(Tuple), - //ty::Array(..) => Res::Primitive(Array), - //ty::Slice(_) => Res::Primitive(Slice), - //ty::RawPtr(_) => Res::Primitive(RawPointer), - //ty::Ref(..) => Res::Primitive(Reference), - //ty::FnDef(..) => panic!("type alias to a function definition"), - //ty::FnPtr(_) => Res::Primitive(Fn), _ => return None, })) } |
