about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-07-27 16:05:13 +0200
committerGitHub <noreply@github.com>2023-07-27 16:05:13 +0200
commit1fa0c4db4fb3b78e91242972b7f2ef5003780091 (patch)
tree9d50f0dc735fd39a8e2b22ad1df9c0d238a48724 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentb8414fe02e378911df3e4381abb7abd54fa9cec7 (diff)
parent28d40f195967ee008fd47b7ad88463ac56e98253 (diff)
downloadrust-1fa0c4db4fb3b78e91242972b7f2ef5003780091.tar.gz
rust-1fa0c4db4fb3b78e91242972b7f2ef5003780091.zip
Rollup merge of #114059 - fmease:rustdoc-fix-x-crate-impl-sized, r=GuillaumeGomez
rustdoc: fix cross-crate `impl Sized` & `impl ?Sized`

Previously, cross-crate impl-Trait (APIT, RPIT, etc.) that only consists of a single `Sized` bound (modulo outlives-bounds) and ones that are `?Sized` were incorrectly rendered. To give you a taste (before vs. after):

```diff
- fn sized(x: impl ) -> impl
+ fn sized(x: impl Sized) -> impl Sized

- fn sized_outlives<'a>(x: impl 'a) -> impl 'a
+ fn sized_outlives<'a>(x: impl Sized + 'a) -> impl Sized + 'a

- fn maybe_sized(x: &impl ) -> &impl
+ fn maybe_sized(x: &impl ?Sized) -> &impl ?Sized

- fn debug_maybe_sized(x: &impl Debug) -> &impl ?Sized + Debug
+ fn debug_maybe_sized(x: &(impl Debug + ?Sized)) -> &(impl Debug + ?Sized)
```

Moreover, we now surround impl-Trait that has multiple bounds with parentheses if they're the pointee of a reference or raw pointer type. This affects both local and cross-crate docs. The current output isn't correct (rustc would emit the error *ambiguous `+` in a type* if we fed the rendered code back to it).

---

Best reviewed commit by commit :)

`@rustbot` label A-cross-crate-reexports
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions