diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-06-19 15:26:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-19 15:26:27 +0200 |
| commit | 3174a694e08d00beff59a07d4117b9ccdb870dd9 (patch) | |
| tree | a2454508192dc21432eaf9ef004539134e7dadf2 /src/etc | |
| parent | 15fc228d0d0a68b5ba565758fab13ed7f863fcea (diff) | |
| parent | 29a9f36685c8da552d0d8772778ff4ec70af0032 (diff) | |
| download | rust-3174a694e08d00beff59a07d4117b9ccdb870dd9.tar.gz rust-3174a694e08d00beff59a07d4117b9ccdb870dd9.zip | |
Rollup merge of #98105 - notriddle:notriddle/tuple-links, r=jsha
rustdoc: remove tuple link on round braces This is #98069 but for tuples. The reasoning is the same: * This PR also changes it so that tuples with all-generic elements still link to the primitive.tuple.html page, just like slices. So there still plenty of on-ramps for anybody who doesn't know about it. * It's too hard to see when round braces are a separate link from the type inside of them. * It's too hard to click even if you do notice them. Before: * impl [ToSocketAddrs](https://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html) for [(](https://doc.rust-lang.org/nightly/std/primitive.tuple.html)[IpAddr](https://doc.rust-lang.org/nightly/std/net/enum.IpAddr.html), [u16](https://doc.rust-lang.org/nightly/std/primitive.u16.html)[)](https://doc.rust-lang.org/nightly/std/primitive.tuple.html) * impl<K, V> [FromIterator](https://notriddle.com/notriddle-rustdoc-test/std/iter/trait.FromIterator.html)<[(](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)K, V[)](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)> for [BTreeMap](https://notriddle.com/notriddle-rustdoc-test/std/collections/struct.BTreeMap.html)<K, V> After: * impl [ToSocketAddrs](https://doc.rust-lang.org/nightly/std/net/trait.ToSocketAddrs.html) for ([IpAddr](https://doc.rust-lang.org/nightly/std/net/enum.IpAddr.html), [u16](https://doc.rust-lang.org/nightly/std/primitive.u16.html)) * impl<K, V> [FromIterator](https://notriddle.com/notriddle-rustdoc-test/std/iter/trait.FromIterator.html)<[(K, V)](https://notriddle.com/notriddle-rustdoc-test/std/primitive.tuple.html)> for [BTreeMap](https://notriddle.com/notriddle-rustdoc-test/std/collections/struct.BTreeMap.html)<K, V>
Diffstat (limited to 'src/etc')
| -rw-r--r-- | src/etc/htmldocck.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/etc/htmldocck.py b/src/etc/htmldocck.py index f762e389005..70b6af717cd 100644 --- a/src/etc/htmldocck.py +++ b/src/etc/htmldocck.py @@ -417,7 +417,7 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text): snapshot_path = '{}.{}.{}'.format(rust_test_path[:-3], snapshot_name, 'html') try: with open(snapshot_path, 'r') as snapshot_file: - expected_str = snapshot_file.read() + expected_str = snapshot_file.read().replace("{{channel}}", channel) except FileNotFoundError: if bless: expected_str = None @@ -429,8 +429,6 @@ def check_snapshot(snapshot_name, actual_tree, normalize_to_text): else: actual_str = flatten(actual_tree) - expected_str = expected_str.replace("{{channel}}", channel) - # Conditions: # 1. Is --bless # 2. Are actual and expected tree different |
