diff options
| author | bors <bors@rust-lang.org> | 2021-12-15 12:41:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-15 12:41:42 +0000 |
| commit | c5ecc157043ba413568b09292001a4a74b541a4e (patch) | |
| tree | 09b6c9ea699750d2d8245bf1b2cbc9d0526c3c92 /src/librustdoc/html | |
| parent | 3ee016ae4d4c6ee4a34faa2eb7fdae2ffa7c9b46 (diff) | |
| parent | 990cf5bca455fe9082b29f24ffc409a182ab48bf (diff) | |
| download | rust-c5ecc157043ba413568b09292001a4a74b541a4e.tar.gz rust-c5ecc157043ba413568b09292001a4a74b541a4e.zip | |
Auto merge of #91962 - matthiaskrgr:rollup-2g082jw, r=matthiaskrgr
Rollup of 7 pull requests
Successful merges:
- #91880 (fix clippy::single_char_pattern perf findings)
- #91885 (Remove `in_band_lifetimes` from `rustc_codegen_ssa`)
- #91898 (Make `TyS::is_suggestable` check for non-suggestable types structually)
- #91915 (Add another regression test for unnormalized fn args with Self)
- #91916 (Fix a bunch of typos)
- #91918 (Constify `bool::then{,_some}`)
- #91920 (Use `tcx.def_path_hash` in `ExistentialPredicate.stable_cmp`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/librustdoc/html')
| -rw-r--r-- | src/librustdoc/html/render/cache.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/html/render/cache.rs b/src/librustdoc/html/render/cache.rs index 2f7214e958e..631eacc9618 100644 --- a/src/librustdoc/html/render/cache.rs +++ b/src/librustdoc/html/render/cache.rs @@ -184,8 +184,8 @@ crate fn build_index<'tcx>(krate: &clean::Crate, cache: &mut Cache, tcx: TyCtxt< }) .expect("failed serde conversion") // All these `replace` calls are because we have to go through JS string for JSON content. - .replace(r"\", r"\\") - .replace("'", r"\'") + .replace(r#"\"#, r"\\") + .replace(r#"'"#, r"\'") // We need to escape double quotes for the JSON. .replace("\\\"", "\\\\\"") ) diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 166e0840127..c67fe1fef40 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -989,7 +989,7 @@ fn attributes(it: &clean::Item) -> Vec<String> { .iter() .filter_map(|attr| { if ALLOWED_ATTRIBUTES.contains(&attr.name_or_empty()) { - Some(pprust::attribute_to_string(attr).replace("\n", "").replace(" ", " ")) + Some(pprust::attribute_to_string(attr).replace('\n', "").replace(" ", " ")) } else { None } |
