about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-07-05Auto merge of #127008 - Jules-Bertholet:tc-ergonomics, r=Nadrierilbors-7/+7
Match ergonomics 2024: Implement TC's match ergonomics proposal Under gate `ref_pat_eat_one_layer_2024_structural`. Enabling `ref_pat_eat_one_layer_2024` at the same time allows the union of what the individual gates allow. `@traviscross` r? `@Nadrieril` cc https://github.com/rust-lang/rust/issues/123076 `@rustbot` label A-edition-2024 A-patterns
2024-07-05Improve `Command::args` API in `run-make-support`Guillaume Gomez-2/+3
2024-07-05Merge from rustcThe Miri Cronjob Bot-23/+16
2024-07-05Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-07-04library: outline VaList into ffi::va_listJubilee Young-0/+2
and reexport
2024-07-04Auto merge of #123781 - RalfJung:miri-fn-identity, r=oli-obkbors-2/+4
Miri function identity hack: account for possible inlining Having a non-lifetime generic is not the only reason a function can be duplicated. Another possibility is that the function may be eligible for cross-crate inlining. So also take into account the inlining attribute in this Miri hack for function pointer identity. That said, `cross_crate_inlinable` will still sometimes return true even for `inline(never)` functions: - when they are `DefKind::Ctor(..) | DefKind::Closure` -- I assume those cannot be `InlineAttr::Never` anyway? - when `cross_crate_inline_threshold == InliningThreshold::Always` so maybe this is still not quite the right criterion to use for function pointer identity.
2024-07-04Auto merge of #3702 - Mandragorian:multiple_targets, r=RalfJungbors-11/+61
Run tests for all specified targets Currently cargo-miri uses the first target specified in the command line. However, when multiple targets are specified in a `cargo build` invocation, cargo will build for all of them. Miri should match this behaviour to reduce surprises. Fixes: #3460
2024-07-04bless testsBennet Bleßmann-10/+10
2024-07-04Add casting tests for `f16` and `f128`Trevor Gross-2/+68
2024-07-04Refactor float casting testsTrevor Gross-186/+390
This is an attempt to remove the magic from a lot of the numbers tested, which should make things easier when it is time to add `f16` and `f128`. A nice side effect is that these tests now cover all int <-> float conversions with the same amount of tests. Co-authored-by: Ralf Jung <post@ralfj.de>
2024-07-04Run tests for all specified targetsKonstantinos Andrikopoulos-11/+61
Currently cargo-miri uses the first target specified in the command line. However, when multiple targets are specified in a `cargo build` invocation, cargo will build for all of them. Miri should match this behaviour to reduce surprises. Fixes: #3460
2024-07-04fix tests after rebaseBennet Bleßmann-2/+2
2024-07-04Auto merge of #127317 - RalfJung:miri-sync, r=RalfJungbors-71/+192
Miri subtree update r? `@ghost`
2024-07-04rewrite pass-linker-flags-flavor to rmakeOneirical-1/+0
2024-07-04rewrite pass-linker-flags to rmakeOneirical-1/+0
2024-07-04Rollup merge of #127314 - chenyukang:yukang-fix-bless-note, r=albertlarsan68Matthias Krüger-1/+1
Trivial update on tidy bless note Make the notes more verbose.
2024-07-04Rollup merge of #127309 - its-the-shrimp:jsondocck_add_file_var, r=aDotInTheVoidMatthias Krüger-1/+1
jsondocck: add `$FILE` built-in variable This built-in variable will allow accessing the full path to the currently tested file and allow to test things like source code spans generated by rustdoc-json, and that is exactly the reason why I've come up with the idea to add this [futher discussion on zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/rustdoc-json.20test.20help/near/449039819)
2024-07-04Rollup merge of #127307 - GuillaumeGomez:different-types-remap_path_prefix, ↵Matthias Krüger-1/+5
r=Kobzol Allow to have different types for arguments of `Rustc::remap_path_prefix` r? `@Kobzol`
2024-07-04Rollup merge of #127301 - estebank:fix-suggestions, r=UrgauMatthias Krüger-15/+0
Tweak some structured suggestions to be more verbose and accurate Addressing some issues I found while working on #127282. ``` error: this URL is not a hyperlink --> $DIR/auxiliary/include-str-bare-urls.md:1:11 | LL | HEADS UP! https://example.com MUST SHOW UP IN THE STDERR FILE! | ^^^^^^^^^^^^^^^^^^^ | = note: bare URLs are not automatically turned into clickable links note: the lint level is defined here --> $DIR/include-str-bare-urls.rs:14:9 | LL | #![deny(rustdoc::bare_urls)] | ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead | LL | HEADS UP! <https://example.com> MUST SHOW UP IN THE STDERR FILE! | + + ``` ``` error[E0384]: cannot assign twice to immutable variable `v` --> $DIR/assign-imm-local-twice.rs:7:5 | LL | v = 1; | ----- first assignment to `v` LL | println!("v={}", v); LL | v = 2; | ^^^^^ cannot assign twice to immutable variable | help: consider making this binding mutable | LL | let mut v: isize; | +++ ``` ``` error[E0393]: the type parameter `Rhs` must be explicitly specified --> $DIR/issue-22560.rs:9:23 | LL | trait Sub<Rhs=Self> { | ------------------- type parameter `Rhs` must be specified for this ... LL | type Test = dyn Add + Sub; | ^^^ | = note: because of the default `Self` reference, type parameters must be specified on object types help: set the type parameter to the desired type | LL | type Test = dyn Add + Sub<Rhs>; | +++++ ``` ``` error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable --> $DIR/issue-33819.rs:4:34 | LL | Some(ref v) => { let a = &mut v; }, | ^^^^^^ cannot borrow as mutable | help: try removing `&mut` here | LL - Some(ref v) => { let a = &mut v; }, LL + Some(ref v) => { let a = v; }, | ``` ``` help: remove the invocation before committing it to a version control system | LL - dbg!(); | ``` ``` error[E0308]: mismatched types --> $DIR/issue-39974.rs:1:21 | LL | const LENGTH: f64 = 2; | ^ expected `f64`, found integer | help: use a float literal | LL | const LENGTH: f64 = 2.0; | ++ ``` ``` error[E0529]: expected an array or slice, found `Vec<i32>` --> $DIR/match-ergonomics.rs:8:9 | LL | [&v] => {}, | ^^^^ pattern cannot match with input type `Vec<i32>` | help: consider slicing here | LL | match x[..] { | ++++ ``` ``` error[E0609]: no field `0` on type `[u32; 1]` --> $DIR/parenthesized-deref-suggestion.rs:10:21 | LL | (x as [u32; 1]).0; | ^ unknown field | help: instead of using tuple indexing, use array indexing | LL | (x as [u32; 1])[0]; | ~ + ```
2024-07-04Delete `CloneAny` from `rust-analyzer`'s fork of `AnyMap`Maybe Lapkin-71/+0
...because it's very sketchy and causes FCWs. In this case it *is* actually sound, but still. I should write a better fork of anymap...
2024-07-04Disallow nested impl traitsShoyu Vanilla-1/+112
2024-07-04add shallow_find_files helper function to run-make-supportOneirical-0/+34
2024-07-04rewrite rmeta-preferred to rmakeOneirical-1/+0
2024-07-04rewrite and rename issue-40535 to rmakeOneirical-1/+0
2024-07-04rewrite optimization-remarks-dir to rmakeOneirical-1/+0
2024-07-04rewrite optimization-remarks-dir-pgo to rmakeOneirical-1/+0
2024-07-04rewrite and rename include_bytes_deps to rmakeOneirical-1/+0
2024-07-04Improve dead code analysismu001999-8/+0
2024-07-04Update windows-bindgen to 0.58.0Chris Denton-1/+2
2024-07-04Auto merge of #3732 - JoJoDeveloping:tree-borrows-protector-end-write, ↵bors-36/+100
r=RalfJung TB: Refine protector end semantics Tree Borrows has protector end tag semantics, namely that protectors ending cause a [special implicit read](https://perso.crans.org/vanille/treebor/diff.0.html) on all locations protected by that protector that have actually been accessed. See also #3067. While this is enough for ensuring protectors allow adding/reordering reads, it does not prove that one can reorder writes. For this, we need to make this stronger, by making this implicit read be a write in cases when there was a write to the location protected by that protector, i.e. if the permission is `Active`. There is a test that shows why this behavior is necessary, see `tests/fail/tree_borrows/protector-write-lazy.rs`.
2024-07-04TB: protector end semantics never causes immediate UBJohannes Hostert-2/+5
2024-07-04trivial update on tidy bless noteyukang-1/+1
2024-07-04Add UI test for protector end write semanticsJohannes Hostert-0/+62
2024-07-04TB: Make FnEntry access on protected locations be a write under certain ↵Johannes Hostert-36/+35
circumstances
2024-07-04added built-in var to jsondocckschvv31n-1/+1
2024-07-04Allow to have different types for arguments of `Rustc::remap_path_prefix`Guillaume Gomez-1/+5
2024-07-04Rollup merge of #127289 - aDotInTheVoid:rustdoc-json-lt, r=GuillaumeGomezJacob Pratt-2/+2
rustdoc-json: Better representation of lifetime bounds in where clauses. As suggested [on zulip][1] (CC `@its-the-shrimp),` there's no need to use `GenericBound` here, as the only bound a lifetime can have is that it outlives other lifetimes. While we're making breaking changes here, I also renamed it from using "region" to "lifetime", as this is more user-aligned. See [this comment][2] for details. [1]: https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/.60ItemEnum.3A.3AOpaqueTy.60/near/448871430 [2]: https://github.com/rust-lang/rust/issues/100961#issuecomment-2206565556 r? `@GuillaumeGomez`
2024-07-04Rollup merge of #127287 - aDotInTheVoid:jsondocck-index, r=GuillaumeGomezJacob Pratt-1/+3
jsondocck: Use correct index for error message. If you misused a count command like ``@count` $some.selector '"T'"`, you would panic with OOB: ``` thread 'main' panicked at src/tools/jsondocck/src/main.rs:76:92: index out of bounds: the len is 2 but the index is 2 ``` This is because 57c85bd97da3 removed the file param, but didn't update the error case. We now error with: ``` Invalid command: Second argument to `@count` must be a valid usize (got `"T"`) on line 20 ``` As some point I want to rewrite this code to avoid indexing in general, but this is a nice small fix. r? `@GuillaumeGomez`
2024-07-04Properly handle removal suggestion renderingEsteban Küber-15/+0
Do not leave a `+ ` line with only whitespace. In reality, the user will want to remove the entire line.
2024-07-04Merge from rustcThe Miri Cronjob Bot-61/+111
2024-07-04Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-07-04Auto merge of #127127 - notriddle:notriddle/pulldown-cmark-0.11, ↵bors-16/+17
r=GuillaumeGomez rustdoc: update to pulldown-cmark 0.11 r? rustdoc This pull request updates rustdoc to the latest version of pulldown-cmark. Along with adding new markdown extensions (which this PR doesn't enable), the new pulldown-cmark version also fixes a large number of bugs. Because all text files successfully parse as markdown, these bugfixes change the output, which can break people's existing docs. A crater run, https://github.com/rust-lang/rust/pull/121659, has already been run for this change. The first commit upgrades and fixes rustdoc. The second commit adds a lint for the footnote and block quote parser changes, which break the largest numbers of docs in the Crater run. The strikethrough change was mitigated in pulldown-cmark itself. Unblocks https://github.com/rust-lang/rust-clippy/pull/12876
2024-07-03Auto merge of #127296 - matthiaskrgr:rollup-1t1isa7, r=matthiaskrgrbors-15/+29
Rollup of 6 pull requests Successful merges: - #127092 (Change return-type-notation to use `(..)`) - #127184 (More refactorings to rustc_interface) - #127190 (Update LLVM submodule) - #127253 (Fix incorrect suggestion for extra argument with a type error) - #127280 (Disable rmake test rustdoc-io-error on riscv64gc-gnu) - #127294 (Less magic number for corountine) r? `@ghost` `@rustbot` modify labels: rollup
2024-07-03Rollup merge of #127092 - compiler-errors:rtn-dots-redux, r=estebankMatthias Krüger-15/+29
Change return-type-notation to use `(..)` Aligns the syntax with the current wording of [RFC 3654](https://github.com/rust-lang/rfcs/pull/3654). Also implements rustfmt support (along with making a match exhaustive). Tracking: * https://github.com/rust-lang/rust/issues/109417
2024-07-03Auto merge of #127044 - Oneirical:fantestic-journey, r=Kobzol,jieyouxubors-6/+1
Migrate `dylib-chain`, `rlib-chain`, `issue-47384`, `msvc-opt-minsize` and `test-harness` `run-make` tests to ui/rmake Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). try-job: x86_64-msvc try-job: aarch64-apple
2024-07-03rustdoc-json: Better representation of lifetime bounds in where clauses.Alona Enraght-Moony-2/+2
As suggested [on zulip][1], there's no need to use `GenericBound` here, as the only bound a lifetime can have is that it outlives other lifetimes. While we're making breaking changes here, I also renamed it from using "region" to "lifetime", as this is more user-aligned. See [this comment][2] for details. [1]: https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/.60ItemEnum.3A.3AOpaqueTy.60/near/448871430 [2]: https://github.com/rust-lang/rust/issues/100961#issuecomment-2206565556
2024-07-03jsondocck: Use correct index for error message.Alona Enraght-Moony-1/+3
If you misused a count command like `@count $some.selector '"T'"`, you would panic with OOB: ``` thread 'main' panicked at src/tools/jsondocck/src/main.rs:76:92: index out of bounds: the len is 2 but the index is 2 ``` Fixing this typo, we now get. ``` Invalid command: Second argument to @count must be a valid usize (got `"T"`) on line 20 ``` As some point I want to rewrite this code to avoid indexing in general, but this is a nice small fix.
2024-07-03Rollup merge of #127264 - GuillaumeGomez:run-make-support-api-improvements, ↵Matthias Krüger-3/+6
r=Kobzol Small `run-make-support` API improvements r? `@Kobzol`
2024-07-03Rollup merge of #127050 - Kobzol:reproducibility-git, r=onur-ozkanMatthias Krüger-4/+32
Make mtime of reproducible tarballs dependent on git commit Since https://github.com/rust-lang/rust/pull/123246, our tarballs should be fully reproducible. That means that the mtime of all files and directories in the tarballs is set to the date of the first Rust commit (from 2006). However, this is causing some mtime invalidation issues (https://github.com/rust-lang/rust/issues/125578#issuecomment-2141068906). Ideally, we would like to keep the mtime reproducible, but still update it with new versions of Rust. That's what this PR does. It modifies the tarball installer bootstrap invocation so that if the current rustc directory is managed by git, we will set the UTC timestamp of the latest commit as the mtime for all files in the archive. This means that the archive should be still fully reproducible from a given commit SHA, but it will also be changed with new beta bumps and `download-rustc` versions. Note that only files are set to this mtime, directories are still set to the year 2006, because the `tar` library used by `rust-installer` doesn't allow us to selectively override mtime for directories (or at least I haven't found it). We could work around that by doing all the mtime modifications in bootstrap, but that would require more changes. I think/hope that just modifying the file mtimes should be enough. It should at least fix cargo `rustc` mtime invalidation. Fixes: https://github.com/rust-lang/rust/issues/125578 r? ``@onur-ozkan`` try-job: x86_64-gnu-distcheck
2024-07-03Auto merge of #125507 - compiler-errors:type-length-limit, r=lcnrbors-4/+4
Re-implement a type-size based limit r? lcnr This PR reintroduces the type length limit added in #37789, which was accidentally made practically useless by the caching changes to `Ty::walk` in #72412, which caused the `walk` function to no longer walk over identical elements. Hitting this length limit is not fatal unless we are in codegen -- so it shouldn't affect passes like the mir inliner which creates potentially very large types (which we observed, for example, when the new trait solver compiles `itertools` in `--release` mode). This also increases the type length limit from `1048576 == 2 ** 20` to `2 ** 24`, which covers all of the code that can be reached with craterbot-check. Individual crates can increase the length limit further if desired. Perf regression is mild and I think we should accept it -- reinstating this limit is important for the new trait solver and to make sure we don't accidentally hit more type-size related regressions in the future. Fixes #125460