diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-01-29 09:17:27 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-29 09:17:27 +0900 |
| commit | 3eac643d044ad9e3841128ab122827e161c65dbd (patch) | |
| tree | 2375a08e25c57c67774b5ed37afa11167d51f00e /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 4003a7397505ddfe3460e52b9dd7666ac785ed38 (diff) | |
| parent | cd8dceef863378706bc27e0a3545c9251f02ec8b (diff) | |
| download | rust-3eac643d044ad9e3841128ab122827e161c65dbd.tar.gz rust-3eac643d044ad9e3841128ab122827e161c65dbd.zip | |
Rollup merge of #79991 - camelid:rustdoc-for-lifetime, r=GuillaumeGomez,jyn514
rustdoc: Render HRTB correctly for bare functions
The angle brackets were not rendered, so code like this:
some_func: for<'a> fn(val: &'a i32) -> i32
would be rendered as:
some_func: fn'a(val: &'a i32) -> i32
However, rendering with angle brackets is still invalid syntax:
some_func: fn<'a>(val: &'a i32) -> i32
so now it renders correctly as:
some_func: for<'a> fn(val: &'a i32) -> i32
-----
However, note that this code:
some_trait: dyn for<'a> Trait<'a>
will still render as:
some_trait: dyn Trait<'a>
which is not invalid syntax, but is still unclear. Unfortunately I think
it's hard to fix that case because there isn't enough information in the
`rustdoc::clean::Type` that this code operates on. Perhaps that case can
be fixed in a later PR.
r? ``@jyn514``
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
