diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2018-01-01 14:22:28 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-01-22 15:24:29 +0530 |
| commit | 191e5b0b78eae71ed9d59d03f2292501dd6d488a (patch) | |
| tree | f8a563a4dccdb2c1a09320c70063cec285f700ff | |
| parent | 4f10f676d9e39940bf54ebfc7017f1505837532f (diff) | |
Exit early for non-linky things
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs index 7daf8a7ae6d..dcf12ed8180 100644 --- a/src/librustdoc/clean/mod.rs +++ b/src/librustdoc/clean/mod.rs @@ -854,6 +854,13 @@ impl Clean<Attributes> for [ast::Attribute] { link.trim() }; + // avoid resolving things (i.e. regular links) which aren't like paths + // FIXME(Manishearth) given that most links have slashes in them might be worth + // doing a check for slashes first + if path_str.contains(|ch: char| !(ch.is_alphanumeric() || ch == ':' || ch == '_')) { + continue; + } + let resolve = |is_val| { // In case we're in a module, try to resolve the relative // path |
