diff options
| author | Camelid <camelidcamel@gmail.com> | 2020-12-12 11:33:45 -0800 |
|---|---|---|
| committer | Camelid <camelidcamel@gmail.com> | 2021-01-27 19:55:46 -0800 |
| commit | cd8dceef863378706bc27e0a3545c9251f02ec8b (patch) | |
| tree | 075d8af8bcabc8ab9207c591450985dada27a871 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | a2f8f6281817d430e20726128b739d3c6708561c (diff) | |
| download | rust-cd8dceef863378706bc27e0a3545c9251f02ec8b.tar.gz rust-cd8dceef863378706bc27e0a3545c9251f02ec8b.zip | |
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.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
