summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-04-18 12:22:13 -0700
committerMichael Howell <michael@notriddle.com>2023-04-18 12:22:13 -0700
commitdf8a48fc8aa537cda418c8c739df417122db3697 (patch)
tree109ccd141d8254858b55282692461d793a2df7b1 /compiler/rustc_resolve/src
parentde96f3d8735b70d5dc1ca178aaee198b329b8f3d (diff)
downloadrust-df8a48fc8aa537cda418c8c739df417122db3697.tar.gz
rust-df8a48fc8aa537cda418c8c739df417122db3697.zip
rustdoc: fix ICE from rustc_resolve and librustdoc parse divergence
Diffstat (limited to 'compiler/rustc_resolve/src')
-rw-r--r--compiler/rustc_resolve/src/rustdoc.rs1
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())
 }