about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-03-16 09:40:04 +0800
committerGitHub <noreply@github.com>2025-03-16 09:40:04 +0800
commit8882dac3425e7ecbb2c1aeff7de48eaa830ae1de (patch)
tree80d7ad34e43169f8e8caabc3009603f41f19d6d7 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentf16ce2ae6ce84428a7df8ed6b9745815ed6c1ca4 (diff)
parente3ac1fa81abd321abe193f491ed06c7d388f68fe (diff)
downloadrust-8882dac3425e7ecbb2c1aeff7de48eaa830ae1de.tar.gz
rust-8882dac3425e7ecbb2c1aeff7de48eaa830ae1de.zip
Rollup merge of #137956 - compiler-errors:rtn-rustdoc, r=fmease
Add RTN support to rustdoc

This adds support to rustdoc and rustdoc-json for rendering `(..)` RTN (return type notation) style generics.

---

Cleaning `rustc_middle::ty::Ty` is not correct still, though, and ends up rendering a function like:

```rust
pub fn foreign<T: Foreign<bar(..): Send>>()
where
    <T as Foreign>::bar(..): 'static,
    T::bar(..): Sync,
```

Into this:

```rust
pub fn foreign<T>()
where
    T: Foreign,
    impl Future<Output = ()>: Send + 'static + Sync,
```

This is because `clean_middle_ty` doesn't actually have sufficient context about whether the RPITIT is in its "defining scope" or not, so we don't know if the type was originally written like `-> impl Trait` or with RTN like `T::method(..)`.

Partially addresses #123996 (i.e., HIR side, not middle::ty one)
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions