summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2022-09-14Remove check_missing_items.pyNixon Enraght-Moony-202/+0
2022-09-13Rustdoc-Json: Don't loose subitems of foreign traits.Nixon Enraght-Moony-2/+7
2022-09-07Rustdoc-Json: More accurate struct type.Nixon Enraght-Moony-3/+5
Closes #101489
2022-09-05Rustdoc-Json: Store Variant Fields as their own item.Nixon Enraght-Moony-3/+3
Closes #100587 Closes #92945
2022-08-31Fix a bunch of typoDezhi Wu-2/+2
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-30Rollup merge of #101175 - tmandry:curse-push-hook, r=jyn514Dylan DPC-1/+1
Don't --bless in pre-push hook Running with --bless causes the push to succeed if there are fixable formatting changes, but the changes don't make it into the push. We should have the user rerun with --bless (or x.py fmt) and commit the changes themselves (they might want to amend a particular commit, for instance).
2022-08-29Don't --bless in pre-push hookTyler Mandry-1/+1
Running with --bless causes the push to succeed if there are fixable formatting changes, but the changes don't make it into the push. We should have the user rerun with --bless (or x.py fmt) and commit the changes themselves (they might want to amend a particular commit, for instance).
2022-08-29Rollup merge of #101106 - aDotInTheVoid:rdj-stripped-mod, r=GuillaumeGomezMatthias Krüger-0/+6
Rustdoc-Json: Retain Stripped Modules when they are imported, not when they have items Fixes #101103 Fixes #100973 r? `@GuillaumeGomez`
2022-08-29check_missing_items.py: Check importsNixon Enraght-Moony-0/+6
2022-08-28Auto merge of #101115 - matthiaskrgr:rollup-iy14ztr, r=matthiaskrgrbors-0/+29
Rollup of 13 pull requests Successful merges: - #97015 (std::io: migrate ReadBuf to BorrowBuf/BorrowCursor) - #98301 (Add GDB/LLDB pretty-printers for NonZero types) - #99570 (Box::from(slice): Clarify that contents are copied) - #100296 (Add standard C error function aliases to last_os_error) - #100520 (Add mention of `BufReader` in `Read::bytes` docs) - #100885 (Export Cancel from std::os::fortanix_sgx::usercalls::raw) - #100955 (Some papercuts on error::Error) - #101002 (Provide structured suggestion for `hashmap[idx] = val`) - #101038 (no alignment check during interning) - #101055 (Use smaller span for suggestions) - #101091 (Extend attrs if local_def_id exists) - #101098 (rustc_middle: Remove `Visibility::Invisible`) - #101102 (unstable-book-gen: use std::fs::write) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-28Rollup merge of #98301 - ortem:pretty-printers-nonzero, r=wesleywiserMatthias Krüger-0/+29
Add GDB/LLDB pretty-printers for NonZero types Add GDB/LLDB pretty-printers for `NonZero` types. These pretty-printers were originally implemented for IntelliJ Rust by ```@Kobzol``` in https://github.com/intellij-rust/intellij-rust/pull/5270. Part of #29392.
2022-08-27Remove RLS from macOS pkg and Windows msi installers.Eric Huss-31/+0
These generally aren't used too much, and I feel like aren't really helpful for installing the RLS stub.
2022-08-24Add GDB/LLDB pretty-printers for NonZero typesArtem Mukhin-0/+29
2022-08-15Auto merge of #98393 - michaelwoerister:new-cpp-like-enum-debuginfo, ↵bors-76/+181
r=wesleywiser debuginfo: Generalize C++-like encoding for enums. The updated encoding should be able to handle niche layouts where more than one variant has fields (as introduced in https://github.com/rust-lang/rust/pull/94075). The new encoding is more uniform as there is no structural difference between direct-tag, niche-tag, and no-tag layouts anymore. The only difference between those cases is that the "dataful" variant in a niche-tag enum will have a `(start, end)` pair denoting the tag range instead of a single value. The new encoding now also supports 128-bit tags, which occur in at least some standard library types. These tags are represented as `u64` pairs so that debuggers (which don't always have support for 128-bit integers) can reliably deal with them. The downside is that this adds quite a bit of complexity to the encoding and especially to the corresponding NatVis. The new encoding seems to increase the size of (x86_64-pc-windows-msvc) debuginfo by 10-15%. The size of binaries is not affected (release builds were built with `-Cdebuginfo=2`, numbers are in kilobytes): EXE | before | after | relative -- | -- | -- | -- cargo (debug) | 40453 | 40450 | +0% ripgrep (debug) | 10275 | 10273 | +0% cargo (release) | 16186 | 16185 | +0% ripgrep (release) | 4727 | 4726 | +0% PDB | before | after | relative -- | -- | -- | -- cargo (debug) | 236524 | 261412 | +11% ripgrep (debug) | 53140 | 59060 | +11% cargo (release) | 148516 | 169620 | +14% ripgrep (release) | 10676 | 11804 | +11% Given that the new encoding is more general, this is to be expected. Only platforms using C++-like debuginfo are affected -- which currently is only `*-pc-windows-msvc`. *TODO* - [x] Properly update documentation - [x] Add regression tests for new optimized enum layouts as introduced by #94075. r? `@wesleywiser`
2022-08-13Rollup merge of #100335 - aDotInTheVoid:rdj-resolved-path, r=GuillaumeGomezMichael Goulet-29/+29
Rustdoc-Json: Add `Path` type for traits. Avoids using `Type` for trait fields, as a trait must always be a path, and not any other kind of type. ``@rustbot`` modify labels: +A-rustdoc-json +T-rustdoc Closes #100106
2022-08-13Fix line lengthsNoah Lev-3/+7
2022-08-13Rename `@hastext` to `@hasraw` (same for `matches`)Noah Lev-7/+7
I think `@hasraw` is slightly clearer than `@hastext` since it is actually matching against the raw HTML, not the text nodes.
2022-08-13Rename `@{has,matches}-literal` to `...text`Noah Lev-7/+7
Reasons: 1. It's shorter. 2. `@matches-literal` seems to contradict itself: a regex is intrinsically not a literal match, while it is still a textual match.
2022-08-13Use different name for arity-2 `@has` and `@matches`Noah Lev-9/+9
See #100354 for the rationale.
2022-08-12[debuginfo] Remove the notion of a 'fallback variant' from the CPP-like enum ↵Michael Woerister-10/+66
debuginfo encoding.
2022-08-12intrinsic.natvis: Add comments, make names more consistent.Michael Woerister-44/+48
2022-08-12intrinsic.natvis: Don't access fields from context object in <Intrinsic>.Michael Woerister-36/+41
WinDbg supports that but Visual Studio doesn't. Pass the value as a parameter instead.
2022-08-12Remove out-dated NatVis visualizer.Michael Woerister-8/+0
2022-08-12Support wrapping 128-bit tag ranges for cpp-like enum debuginfo.Michael Woerister-2/+4
2022-08-12Use enum2<_> instead of enum<_> for Cpp-like debuginfo enum type names.Michael Woerister-2/+2
And add more comments about niche tag enum encoding.
2022-08-12debuginfo: Change C++-like encoding for enums.Michael Woerister-67/+113
The updated encoding should be able to handle niche layouts where more than one variant has fields.
2022-08-10Rustdoc-Json: Add `Path` type for traits.Nixon Enraght-Moony-29/+29
Closes #100106
2022-07-30check_missing_items.py: Don't overwrite `ty` in loopNixon Enraght-Moony-2/+2
Because python doesn't have lexical scope, loop variables persist after the loop is exited, set to the value of the last itteration ``` >>> i = 0 >>> for i in range(10): pass ... >>> i 9 ``` This causes the `ty` variable to be changed, causing unexpected crashes on ``` pub type RefFn<'a> = &'a dyn for<'b> Fn(&'a i32) -> i32; ```
2022-07-26Htmldocck: Substitute the doc channel when blessingLeón Orell Valerian Liehr-0/+1
2022-06-22Rollup merge of #95446 - notseanray:master, r=Mark-SimulacrumYuki Okushi-5/+15
update CPU usage script I've made slight changes to the CPU usage plot script with updated links from the [ci2 aws instance](https://rust-lang-ci2.s3.amazonaws.com/).
2022-06-21update cpu-usage-over-time-plot scriptnotseanray-5/+15
fix tidy checks and correct cpu-usage-over-time-plot script
2022-06-19Rollup merge of #98105 - notriddle:notriddle/tuple-links, r=jshaDylan DPC-3/+1
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>
2022-06-18Fix bug when using `--bless`Michael Howell-3/+1
2022-06-15debuginfo: Fix NatVis for Rc and Arc with unsized pointees.Michael Woerister-16/+110
2022-06-06Rollup merge of #90905 - GuillaumeGomez:empty-impl-blocks, r=jshaMatthias Krüger-16/+31
Add empty impl blocks if they have documentation Fixes https://github.com/rust-lang/rust/issues/90866. The update for the test script is needed to count the number of impl blocks we have with only the struct. To be noted that with https://github.com/rust-lang/rust/pull/89676 merged, it wouldn't be needed (I don't know what is the status of it btw. cc ```@Mark-Simulacrum).``` It looks like this: ![Screenshot from 2021-11-14 16-51-28](https://user-images.githubusercontent.com/3050060/141689100-e57123c0-bf50-4c42-adf5-d991e169a0e4.png) cc ```@jyn514``` r? ```@camelid```
2022-06-02rustdoc: add channel normalization to htmldocck.pyMichael Howell-0/+2
2022-05-31Update test script for src/test/rustdoc to allow to add a filter for the ↵Guillaume Gomez-16/+31
@count command
2022-05-16Read the Ref/RefMut pointer in natvisJosh Stone-4/+4
2022-04-30Store all generic bounds as where predicates.Camille GILLOT-2/+0
2022-04-17Fix --bless not working anymore in htmldocckLoïc BRANSTETT-1/+5
2022-04-17Auto merge of #96010 - eduardosm:Unique-on-top-of-NonNull, r=m-ou-se,tmiaskobors-11/+17
Implement `core::ptr::Unique` on top of `NonNull` Removes the use `rustc_layout_scalar_valid_range_start` and some `unsafe` blocks.
2022-04-16htmldocck: Compare HTML tree instead of plain text htmlLoïc BRANSTETT-4/+66
2022-04-14Update *.natvis files (CDB?) files to take into account `Unique<T>` changesEduardo Sánchez Muñoz-10/+10
2022-04-14Fix debugger testsEduardo Sánchez Muñoz-1/+7
2022-04-11pre-push.sh: Use python3 if python is not foundCheng XU-1/+3
Since Python 2 has reached EOL, `python` may not be available in certain systems (e.g., recent macOS). We should use `python3` in this case to avoid error like `python: No such file or directory`.
2022-03-14rustdoc-json-types: implementors -> implementationsNixon Enraght-Moony-1/+1
Closes #94198
2022-03-13rustdoc-json-types: ty -> type_Nixon Enraght-Moony-1/+1
Fixes #94889
2022-02-08Auto merge of #93626 - wesleywiser:fix_hashmap_natvis, r=michaelwoeristerbors-1/+1
Fix HashMap not displaying correctly in VS debugger The natvis to render HashMaps was not working correctly in Visual Studio because the type names for tuples changed from `tuple$<A, B>` to `tuple$<A,B>` (notice the missing space). WinDbg and cdb continued to parse this type name which is why no tests in CI broke. VS however is slightly more strict and this caused the visualizer to break. Since we cannot test the VS debugger in CI, I'm not checking in any test changes. Fixes #92286 r? `@michaelwoerister`
2022-02-07Rollup merge of #88313 - jyn514:pre-push, r=Mark-SimulacrumMara Bos-1/+1
Make the pre-commit script pre-push instead This should make it substantially less annoying, and hopefully more people will find it useful. In particular, it will no longer run tidy each time you run `git commit --amend` or rebase a branch. This also warns if you have the old script in pre-commit; see the HACK comment for details. r? ````@Mark-Simulacrum```` cc ````@caass````
2022-02-03Fix HashMap not displaying correctly in VS debuggerWesley Wiser-1/+1
The natvis to render HashMaps was not working correctly in Visual Studio because the type names for tuples changed from `tuple$<A, B>` to `tuple$<A,B>` (notice the missing space). WinDbg and cdb continued to parse this type name which is why no tests in CI broke. VS however is slightly more strict and this caused the visualizer to break. Since we cannot test the VS debugger in CI, I'm not checking in any test changes.