about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev+love@gmail.com>2022-11-07 09:46:25 +0900
committerGitHub <noreply@github.com>2022-11-07 09:46:25 +0900
commit63f78d17b4c302bcf96bae306ffb42eecb0a5e6f (patch)
tree850c2afee8f691ccc11ad863490aa1ebf0178133 /compiler/rustc_codegen_llvm/src
parent7eef946fc0e0eff40e588eab77b09b287accbec3 (diff)
parent5ccaed212e111e0850a764c1c090261c0c431413 (diff)
downloadrust-63f78d17b4c302bcf96bae306ffb42eecb0a5e6f.tar.gz
rust-63f78d17b4c302bcf96bae306ffb42eecb0a5e6f.zip
Rollup merge of #103885 - fmease:rustdoc-various-cross-crate-reexport-fixes, r=cjgillot,GuillaumeGomez
rustdoc: various cross-crate reexport fixes

Fixes for various smaller cross-crate reexport issues.
The PR is split into several commits for easier review. Will be squashed after approval.

Most notable changes:

* We finally render late-bound lifetimes in the generic parameter list of cross-crate functions & methods.
  Previously, we would display the re-export of `pub fn f<'s>(x: &'s str) {}` as `pub fn f(x: &'s str)`
* We now render unnamed parameters of cross-crate functions and function pointers as underscores
  since that's exactly what we do for local definitions, too. Mentioned as a bug in #44306.
* From now on, the rendering of cross-crate trait-object types is more correct:
  * `for<>` parameter lists (for higher-ranked lifetimes) are now shown
  * the return type of `Fn{,Mut,Once}` trait bounds is now displayed

Regarding the last list item, here is a diff for visualization (before vs. after):

```patch
- dyn FnOnce(&'any str) + 'static
+ dyn for<'any> FnOnce(&'any str) -> bool + 'static
```

The redundant `+ 'static` will be removed in a follow-up PR that will hide trait-object lifetime-bounds if they coincide with [their default](https://doc.rust-lang.org/reference/lifetime-elision.html#default-trait-object-lifetimes) (see [Zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/clean_middle_ty.3A.20I.20need.20to.20add.20a.20parameter/near/307143097)). `FIXME(fmease)`s were added.

``@rustbot`` label A-cross-crate-reexports
r? ``@GuillaumeGomez``
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions