about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-05-08Rollup merge of #124876 - nnethercote:rm-use-crate-rustc_foo, r=compiler-errorsMatthias Krüger-8/+5
Simplify `use crate::rustc_foo::bar` occurrences. They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.) r? ``@eholk``
2024-05-08Rollup merge of #124587 - reitermarkus:use-generic-nonzero, r=dtolnayMatthias Krüger-201/+178
Generic `NonZero` post-stabilization changes. Tracking issue: https://github.com/rust-lang/rust/issues/120257 r? ``@dtolnay``
2024-05-08Rollup merge of #123344 - pietroalbini:pa-unused-imports, r=NilstriebMatthias Krüger-10/+12
Remove braces when fixing a nested use tree into a single item [Back in 2019](https://github.com/rust-lang/rust/pull/56645) I added rustfix support for the `unused_imports` lint, to automatically remove them when running `cargo fix`. For the most part this worked great, but when removing all but one childs of a nested use tree it turned `use foo::{Unused, Used}` into `use foo::{Used}`. This is slightly annoying, because it then requires you to run `rustfmt` to get `use foo::Used`. This PR automatically removes braces and the surrouding whitespace when all but one child of a nested use tree are unused. To get it done I had to add the span of the nested use tree to the AST, and refactor a bit the code I wrote back then. A thing I noticed is, there doesn't seem to be any `//@ run-rustfix` test for fixing the `unused_imports` lint. I created a test in `tests/suggestions` (is that the right directory?) that for now tests just what I added in the PR. I can followup in a separate PR to add more tests for fixing `unused_lints`. This PR is best reviewed commit-by-commit.
2024-05-08Auto merge of #3580 - tiif:feat/malloc0-non-null-pointer, r=RalfJungbors-19/+74
Implement non-null pointer for malloc(0) Use non-null pointer for malloc(0) as mentioned in #3576 to detect leaks and double free of ``malloc(0)`` addresses.
2024-05-09Implement non-null pointer for malloc(0)tiif-19/+74
2024-05-08Use generic `NonZero`.Markus Reiter-65/+65
2024-05-08Simplify `clippy` lint.Markus Reiter-136/+113
2024-05-08Make term search fuel configurableTavo Annus-9/+56
2024-05-08Auto merge of #3589 - RalfJung:io-error, r=RalfJungbors-34/+31
io::Error handling: keep around the full io::Error for longer so we can give better errors This should help with the error message in https://github.com/rust-lang/miri/issues/3587.
2024-05-08io::Error handling: keep around the full io::Error for longer so we can give ↵Ralf Jung-34/+31
better errors
2024-05-08miri: rename intrinsic_fallback_checks_ub to intrinsic_fallback_is_specRalf Jung-18/+18
2024-05-08Migrate `run-make/rustdoc-map-file` to rmakeGuillaume Gomez-1/+0
2024-05-08use key-value format in stage0 fileonur-ozkan-43/+105
Currently, we are working on the python removal task on bootstrap. Which means we have to extract some data from the stage0 file using shell scripts. However, parsing values from the stage0.json file is painful because shell scripts don't have a built-in way to parse json files. This change simplifies the stage0 file format to key-value pairs, which makes it easily readable from any environment. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-05-08Simplify `use crate::rustc_foo::bar` occurrences.Nicholas Nethercote-8/+5
They can just be written as `use rustc_foo::bar`, which is far more standard. (I didn't even know that a `crate::` prefix was valid.)
2024-05-07Update cargoWeihang Lo-0/+0
2024-05-07remove problems that I do not think we have seen in a whileRalf Jung-13/+0
2024-05-07README: update introductionRalf Jung-39/+31
2024-05-07Use unit of work as fuel instead of timeTavo Annus-42/+48
2024-05-07Rollup merge of #124738 - notriddle:notriddle/search-form-js, r=GuillaumeGomezMatthias Krüger-0/+2
rustdoc: dedup search form HTML This change constructs the search form HTML using JavaScript, instead of plain HTML. It uses a custom element because - the [parser]'s insert algorithm runs the connected callback synchronously, so we won't get layout jank - it requires very little HTML, so it's a real win in size [parser]: https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token This shrinks the standard library by about 60MiB, by my test. There should be no visible changes. Just use less disk space.
2024-05-07Auto merge of #17192 - roife:fix-issue-17179, r=lnicolabors-1/+46
Fix source_range for INT_NUMBER in completion fix #17179. Previously r-a use `TextRange::empty(self.position.offset)` as `source_range` for `INT_NUMBER`, so the `text_edit` would always be an insertion, which results in #17179. This PR changed it by using `text_range` of `original_token` (same as `IDENT`).
2024-05-06rustdoc: allow custom element rustdoc-searchMichael Howell-0/+2
2024-05-06Add time based fuel to term searchTavo Annus-8/+36
2024-05-06Collapse term search exprs before Cartesian product to avoid OOMTavo Annus-20/+43
2024-05-06Refactor float `Primitive`s to a separate `Float` typebeetrees-6/+6
2024-05-06Auto merge of #124753 - GuillaumeGomez:migrate-rustdoc-determinism, r=jieyouxubors-12/+31
Migrate `run-make/rustdoc-error-lines` to new `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. There was a weird naming inconsistency with `input`/`output`. A few tests write `.arg("-o").arg(path)` and the `output` method was actually the command output. So instead, I renamed the original `output` into `command_output` so that I could create the `output` method with the expected effect (and updated the tests to use it too). EDIT: The first two commits come from https://github.com/rust-lang/rust/pull/124711. Some weird things happened recently pparently. ^^' r? `@jieyouxu`
2024-05-06Implement unsafe attribute parsingLukas Wirth-11/+534
2024-05-06Auto merge of #124497 - rytheo:move-std-tests-to-library, r=workingjubileebors-1/+0
Move some stdlib tests from `tests/ui` to `library/std/tests` Related to #99417
2024-05-06Auto merge of #3579 - RalfJung:libc, r=RalfJungbors-208/+211
organize libc tests into a proper folder, and run some of them on Windows
2024-05-06organize libc tests into a proper folder, and run some of them on WindowsRalf Jung-208/+211
2024-05-06Implement wcslenAsger Hautop Drewsen-9/+64
2024-05-06Auto merge of #3578 - RalfJung:realloc, r=RalfJungbors-7/+1
avoid code duplication between realloc and malloc
2024-05-06avoid code duplication between realloc and mallocRalf Jung-7/+1
2024-05-06Migrate `run-make/rustdoc-error-lines` to `rmake.rs`Guillaume Gomez-1/+0
2024-05-06Add new `output` method to `Rustc` and `Rustdoc` typesGuillaume Gomez-0/+14
2024-05-06Fix source_range for INT_NUMBER in completionroife-1/+46
2024-05-05Auto merge of #3574 - RalfJung:deps, r=RalfJungbors-163/+17
reduce test_dependencies Also add comments for why we need all these 3 random functions for Windows, and the old Linux syscall interface.
2024-05-05getrandom: test with and without isolationRalf Jung-23/+16
also add some comments for why we keep certain old obscure APIs supported
2024-05-05remove rand testRalf Jung-61/+0
the actual target-specific things we want to test are all in getrandom, and rand already tests miri itself
2024-05-05reduce tokio featuresRalf Jung-79/+1
2024-05-05Auto merge of #3570 - devnexen:solaris_build_fix, r=RalfJungbors-8/+27
Solaris: make pre-main code work Fixes https://github.com/rust-lang/miri/issues/3566
2024-05-05solaris support start.David Carlier-8/+27
2024-05-05fix lifetime bound var index in dyn traitdfireBird-5/+25
2024-05-05Auto merge of #124754 - RalfJung:miri-sync, r=RalfJungbors-1622/+1828
Miri subtree update r? `@ghost`
2024-05-05unix/fs: a bit of cleanup around host-specific codeRalf Jung-28/+18
2024-05-05tests: update test in assist apply_demorganroife-10/+8
2024-05-05use the repository field to link to the repositoryGábor Szabó-1/+2
2024-05-05Rename `run-make-support` library `output` method to `command_output`Guillaume Gomez-10/+10
2024-05-05Migrate `run-make/doctests-runtool` to rmakeGuillaume Gomez-1/+0
2024-05-05Implement `edition` method on `Rustdoc` type as wellGuillaume Gomez-0/+7
2024-05-05Rollup merge of #124749 - RossSmyth:stable_range, r=davidtwcoGuillaume Gomez-72/+66
Stabilize exclusive_range_pattern (v2) This PR is identical to #124459, which was approved and merged but then removed from master by a force-push due to a [CI bug](https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/ci.20broken.3F). r? ghost Original PR description: --- Stabilization report: https://github.com/rust-lang/rust/issues/37854#issuecomment-1842398130 FCP: https://github.com/rust-lang/rust/issues/37854#issuecomment-1872520294 Stabilization was blocked by a lint that was merged here: #118879 Documentation PR is here: rust-lang/reference#1484 `@rustbot` label +F-exclusive_range_pattern +T-lang