about summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2023-01-04adjust comments about pre-push.sh hookKaDiWa-1/+1
2022-12-17Make the pre-push script work on directories with spacesJoshua Nelson-10/+2
As a secondary benefit, it's also a lot simpler.
2022-11-27Fix natvis `VecDeque` formatterMarkus Everling-8/+7
2022-11-20Update VecDeque implementationMarkus Everling-14/+6
2022-10-31[debuginfo] Make debuginfo type names for slices and str consistent.Michael Woerister-6/+14
Before this PR, the compiler would emit the debuginfo name `slice$<T>` for all kinds of slices, regardless of whether they are behind a reference or not and regardless of the kind of reference. As a consequence, the types `Foo<&[T]>`, `Foo<[T]>`, and `Foo<&mut [T]>` would end up with the same type name `Foo<slice$<T> >` in debuginfo, making it impossible to disambiguate between them by name. Similarly, `&str` would get the name `str` in debuginfo, so the debuginfo name for `Foo<str>` and `Foo<&str>` would be the same. In contrast, `*const [bool]` and `*mut [bool]` would be `ptr_const$<slice$<bool> >` and `ptr_mut$<slice$<bool> >`, i.e. the encoding does not lose information about the type. This PR removes all special handling for slices and `str`. The types `&[bool]`, `&mut [bool]`, and `&str` thus get the names `ref$<slice2$<bool> >`, `ref_mut$<slice2$<bool> >`, and `ref$<str$>` respectively -- as one would expect.
2022-10-14Rollup merge of #102092 - kxxt:patch-1, r=joshtriplettMatthias Krüger-2/+8
refactor: use grep -E/-F instead of fgrep/egrep `egrep` and `fgrep` are obsolescent now. This PR updates all `egrep` and `fgrep` commands to `grep -E` and `grep -F`. Running egrep/fgrep command with grep v3.8 will output the following warning to stderr: ``` egrep: warning: egrep is obsolescent; using grep -E ``` - https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep - https://lists.gnu.org/archive/html/info-gnu/2022-09/msg00001.html
2022-10-08Rollup merge of #99194 - ↵Matthias Krüger-2/+1
simlay:simlay/update-rust-gdbgui-gdb-args-to-gdb-cmd, r=Mark-Simulacrum Fix gdb-cmd for rust-gdbgui With https://github.com/cs01/gdbgui/pull/198, the way that gdbgui arguments were specified changed. I've tested this with program generated from `cargo new --bin` and it worked as gdbgui should. Closes #76383.
2022-09-28Add a niche to `Duration`, unix `SystemTime`, and non-apple `Instant`beetrees-2/+2
2022-09-26simplifykxxt-4/+1
2022-09-22refactor: use grep -E/-F instead of fgrep/egrepkxxt-2/+11
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-07-12Fix gdb-cmd for rust-gdbguiSebastian Imlay-2/+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