diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2023-04-21 20:35:28 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-21 20:35:28 +0530 |
| commit | fbc905e16adfbc934226a8bd9a5a4e16c8196aed (patch) | |
| tree | 54deda0072af28603d192a7570b9df898b02dbc7 /compiler/rustc_resolve/src | |
| parent | ff4a5fbbe57c443e512377435770c72ba9593656 (diff) | |
| parent | df8a48fc8aa537cda418c8c739df417122db3697 (diff) | |
| download | rust-fbc905e16adfbc934226a8bd9a5a4e16c8196aed.tar.gz rust-fbc905e16adfbc934226a8bd9a5a4e16c8196aed.zip | |
Rollup merge of #110501 - notriddle:notriddle/ice-110495, r=petrochenkov
rustdoc: fix ICE from rustc_resolve and librustdoc parse divergence Fixes #110495
Diffstat (limited to 'compiler/rustc_resolve/src')
| -rw-r--r-- | compiler/rustc_resolve/src/rustdoc.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_resolve/src/rustdoc.rs b/compiler/rustc_resolve/src/rustdoc.rs index 9eae99be2e9..d433391f272 100644 --- a/compiler/rustc_resolve/src/rustdoc.rs +++ b/compiler/rustc_resolve/src/rustdoc.rs @@ -367,6 +367,7 @@ fn preprocess_link(link: &str) -> Box<str> { let link = link.strip_suffix("{}").unwrap_or(link); let link = link.strip_suffix("[]").unwrap_or(link); let link = if link != "!" { link.strip_suffix('!').unwrap_or(link) } else { link }; + let link = link.trim(); strip_generics_from_path(link).unwrap_or_else(|_| link.into()) } |
