about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2025-01-30Rollup merge of #136199 - purplesyringa:emscripten-tests, r=jieyouxuMatthias Krüger-0/+1
Fix a couple Emscripten tests This fixes a couple Emscripten tests where the correct fix is more or less obvious. A couple UI tests are still broken with this PR: - `tests/ui/abi/numbers-arithmetic/return-float.rs` (#136197) - `tests/ui/no_std/no-std-unwind-binary.rs` (haven't debugged yet) - `tests/ui/test-attrs/test-passed.rs` (haven't debugged this either) `````@rustbot````` label +T-compiler +O-emscripten
2025-01-30Rollup merge of #133636 - GuillaumeGomez:sans-serif, r=rustdocMatthias Krüger-1/+1
[rustdoc] Add sans-serif font setting Fixes https://github.com/rust-lang/rust/issues/52449. This PR adds a new setting introducing the possibility to switch to a sans-serif font (`Fira Sans`) for the text. Can be tested [here](https://rustdoc.crud.net/imperio/sans-serif/std/index.html). cc ```@rust-lang/rustdoc-frontend``` r? ```@notriddle```
2025-01-30Auto merge of #136035 - SpecificProtagonist:miri-zeroed-alloc, r=oli-obkbors-49/+29
miri: optimize zeroed alloc When allocating zero-initialized memory in MIR interpretation, rustc allocates zeroed memory, marks it as initialized and then re-zeroes it. Remove the last step. I don't expect this to have much of an effect on performance normally, but in my case in which I'm creating a large allocation via mmap it gets in the way.
2025-01-29Auto merge of #135818 - jieyouxu:migrate-translation, r=compiler-errorsbors-3/+14
tests: Port `translation` to rmake.rs Part of #121876. This PR partially supersedes #129011 and is co-authored with `@Oneirical.` ## Summary This PR ports `tests/run-make/translation` to rmake.rs. Notable changes from the Makefile version include: - We now actually fail if the rustc invocations fail... The Makefile did not have `SHELL=/bin/bash -o pipefail`, so all the piped rustc invocations to grep vacuously succeeded, even if the broken ftl test case actually regressed over time and ICEs on current master. - That test case is converted to assert it fails with a FIXME backlinking to #135817. - The test coverage is expanded to not ignore windows. Instead, the test now uses symlink capability detection to gate test execution. - Added some backlinks to relevant tracking issues and the initial translation infra implementation PR. ## Review advice Best reviewed commit-by-commit. r? compiler try-job: aarch64-apple try-job: i686-mingw
2025-01-29Auto merge of #134248 - oli-obk:patkind-path-removal, r=BoxyUwUbors-57/+135
Merge `PatKind::Path` into `PatKind::Expr` Follow-up to #134228 We always had a duplication where `Path`s could be represented as `PatKind::Path` or `PatKind::Lit(ExprKind::Path)`. We had to handle both everywhere, and still do after #134228, so I'm removing it now.
2025-01-29Eliminate PatKind::PathOli Scherer-57/+135
2025-01-29Rollup merge of #136211 - ehuss:update-mdbook, r=ehussMatthias Krüger-27/+27
Update mdbook to 0.4.44 Updates to mdbook 0.4.44. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0444
2025-01-29Fix tidy errorsGuillaume Gomez-1/+1
2025-01-29Auto merge of #136117 - lnicola:sync-from-ra, r=lnicolabors-1325/+2163
Subtree update of `rust-analyzer` r? `@ghost`
2025-01-29tests: port `translation` to rmake.rs许杰友 Jieyou Xu (Joe)-1/+0
Co-authored-by: Oneirical <manchot@videotron.ca>
2025-01-29run-make-support: improve docs for `assert_exit_code`许杰友 Jieyou Xu (Joe)-1/+5
2025-01-29run-make-support: add `sysroot` helper许杰友 Jieyou Xu (Joe)-1/+9
Convenience helper for `rustc --print=sysroot`.
2025-01-29Rollup merge of #136164 - celinval:chores-fnkind, r=oli-obkLeón Orell Valerian Liehr-13/+23
Refactor FnKind variant to hold &Fn Pulling the change suggested in #128045 to reduce the impact of changing `Fn` item. r? `@oli-obk`
2025-01-29Rollup merge of #136147 - RalfJung:required-target-features-check-not-add, ↵León Orell Valerian Liehr-2/+2
r=workingjubilee ABI-required target features: warn when they are missing in base CPU Part of https://github.com/rust-lang/rust/pull/135408: instead of adding ABI-required features to the target we build for LLVM, check that they are already there. Crucially we check this after applying `-Ctarget-cpu` and `-Ctarget-feature`, by reading `sess.unstable_target_features`. This means we can tweak the ABI target feature check without changing the behavior for any existing user; they will get warnings but the target features behave as before. The test changes here show that we are un-doing the "add all required target features" part. Without the full #135408, there is no way to take a way an ABI-required target feature with `-Ctarget-cpu`, so we cannot yet test that part. Cc ``@workingjubilee``
2025-01-29Rollup merge of #135943 - hkBst:opt_imports, r=estebankLeón Orell Valerian Liehr-2/+2
Rename `Piece::String` to `Piece::Lit` This renames Piece::String to Piece::Lit to avoid shadowing std::string::String and removes "pub use Piece::*;".
2025-01-29Rollup merge of #135902 - compiler-errors:item-non-self-bound-in-new-solver, ↵León Orell Valerian Liehr-4/+4
r=lcnr Do not consider child bound assumptions for rigid alias r? lcnr See first commit for the important details. For second commit, I also stacked a somewhat opinionated name change, though I can separate that if needed. Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/149
2025-01-28Auto merge of #136209 - flip1995:clippy-subtree-update, r=Manishearthbors-795/+5679
Clippy subtree update r? `@Manishearth` Quite a bit late, as I was on vacation and then we had an issue in MacOS CI after the sync.
2025-01-28Refactor FnKind variant to hold &FnCelina G. Val-13/+23
2025-01-28Make item self/non-self bound naming less whackMichael Goulet-4/+4
2025-01-28Update mdbook to 0.4.44Eric Huss-27/+27
Updates to mdbook 0.4.44. Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0444
2025-01-28Merge commit '51d49c1ae2785b24ef18a46ef233fc1d91844666' into ↵Philipp Krones-795/+5679
clippy-subtree-update
2025-01-28parse_format optimize import useMarijn Schouten-2/+2
2025-01-28Fix tests/codegen/float/f128Alisa Sireneva-0/+1
2025-01-28Rollup merge of #135961 - saethlin:skip-less-in-opt-dist, r=jieyouxuMatthias Krüger-13/+7
Fix 2/4 tests skipped by opt-dist The linker errors were because this one test, strangely, wants itself compiled with `-Ctarget-features=+crt-static`, and yet it looks like the runner image is simply missing static libraries for libc and libm. Eyeballing the output of ``` rustc +nightly --target=x86_64-pc-windows-msvc -O tests/codegen/vec-shrink-panik.rs --emit=llvm-ir ``` suggests that vec-shrink-panik should pass on Windows. And it's quite disturbing that such a test would have failed only on Windows to start with. Exactly why that was would require some advanced digging, but it looks clean now.
2025-01-28Rollup merge of #135748 - compiler-errors:len-2, r=RalfJung,oli-obkMatthias Krüger-0/+35
Lower index bounds checking to `PtrMetadata`, this time with the right fake borrow semantics 😸 Change `Rvalue::RawRef` to take a `RawRefKind` instead of just a `Mutability`. Then introduce `RawRefKind::FakeForPtrMetadata` and use that for lowering index bounds checking to a `PtrMetadata`. This new `RawRefKind::FakeForPtrMetadata` acts like a shallow fake borrow in borrowck, which mimics the semantics of the old `Rvalue::Len` operation we're replacing. We can then use this `RawRefKind` instead of using a span desugaring hack in CTFE. cc ``@scottmcm`` ``@RalfJung``
2025-01-28miri: optimize zeroed allocSpecificProtagonist-49/+29
Co-authored-by: Ralf Jung <post@ralfj.de>
2025-01-28ABI-required target features: warn when they are missing in base CPU (rather ↵Ralf Jung-2/+2
than silently enabling them)
2025-01-28Represent the raw pointer for a array length check as a new kind of fake borrowMichael Goulet-0/+35
2025-01-27Fix 2/4 tests skipped by opt-distBen Kimock-13/+7
2025-01-27Auto merge of #136110 - RalfJung:miri-sync, r=RalfJungbors-16/+22
Miri subtree update r? `@ghost`
2025-01-27Rollup merge of #136112 - fmease:clean-up-all-dead-files-in-ui-tests, ↵Guillaume Gomez-2/+1
r=compiler-errors Clean up all dead files inside `tests/ui/` While rebasing #135860 I noticed that there are several dead `*.stderr` files inside `tests/ui/`. When I checked thoroughly, I found 69 dead `*.$revision.stderr` files, 3 other dead `*.stderr` files and one dead `*.rs` file. Prior to #134808, compiletest's `--bless` didn't remove dead `*.stderr` files when the set of revisions changed in any way (renamings, removals, additions, …) which explains their existence. Regarding the dead `*.rs` file, that one was located inside an `auxiliary/` directory (together with a `*.stderr` file) despite not being meant to be an auxiliary file (it's not referenced by any `//@ aux-*`, it has an accompanying `*.stderr` file and it's obvious from looking at #111056 which added it). Ideally compiletest or tidy would forbid `*.std{out,err}` files inside `auxiliary/` dirs, that would've caught it. I moved it, updated it and turned it into a proper UI test. --- How to reproduce: 1. Run `rm tests/ui/**/*.stderr` 2. Run `./x test tests/ui --bless` (or similar) 3. Manually / semi-automatically go through all tests that were ignored (likely due to your OS etc. not matching) and restore any stderr files that were overzealously removed --- r? compiler
2025-01-27Rollup merge of #126604 - kadiwa4:uplift_double_negation, r=nnethercoteLeón Orell Valerian Liehr-146/+93
Uplift `clippy::double_neg` lint as `double_negations` Warns about cases like this: ```rust fn main() { let x = 1; let _b = --x; //~ WARN use of a double negation } ``` The intent is to keep people from thinking that `--x` is a prefix decrement operator. `++x`, `x++` and `x--` are invalid expressions and already have a helpful diagnostic. I didn't add a machine-applicable suggestion to the lint because it's not entirely clear what the programmer was trying to achieve with the `--x` operation. The code that triggers the lint should always be reviewed manually. Closes #82987
2025-01-27Make a previously unreachable UI test reachableLeón Orell Valerian Liehr-1/+0
2025-01-27Remove all dead files inside tests/ui/León Orell Valerian Liehr-1/+1
2025-01-26Merge pull request #4154 from RalfJung/linux-futexRalf Jung-3/+2
make linux-futex test less flaky
2025-01-26make linux-futex test less flakyRalf Jung-3/+2
2025-01-26Pre-intern name when searching module childrenMark Rousskov-1/+2
This avoids a good deal of work, since each module child can now just be compared via u32 comparison, rather than fetching the raw &str (requiring locking and indexing into the interner) and then comparing the two strings (also relatively expensive).
2025-01-26many-seeds: do not use more than 8 threadsRalf Jung-4/+3
2025-01-26many-seeds: in keep-going mode, print how many tests failedRalf Jung-2/+8
2025-01-26prevent weird macOS linker errors from breaking the buildRalf Jung-1/+3
2025-01-26remove `clippy::double_neg`Kalle Wachsmuth-146/+93
2025-01-26Auto merge of #135753 - compiler-errors:from-ty-const, r=oli-obkbors-10/+6
Get rid of `mir::Const::from_ty_const` This function is strange, because it turns valtrees into `mir::Const::Value`, but the rest of the const variants stay as type system consts. All of the callsites except for one in `instsimplify` (array length simplification of `ptr_metadata` call) just go through the valtree arm of the function, so it's easier to just create a `mir::Const` directly for those. For the instsimplify case, if we have a type system const we should *keep* having a type system const, rather than turning it into a `mir::Const::Value`; it doesn't really matter in practice, though, bc `usize` has no padding, but it feels more principled.
2025-01-26Merge pull request #19035 from rust-lang/Veykril-patch-1Lukas Wirth-12/+6
Update outdated permissions section in the README.md
2025-01-26Update outdated permissions section in the README.mdLukas Wirth-12/+6
2025-01-26Merge pull request #19034 from ChayimFriedman2/complete-hidden-variantLukas Wirth-55/+102
fix: Don't complete doc(hidden) enum variants and use trees
2025-01-26Merge pull request #19033 from ChayimFriedman2/span-1Chayim Refael Friedman-4/+4
fix: Make proc_macro span's line & column 1-indexed, as documented
2025-01-26Make proc_macro span's line & column 1-indexed, as documentedChayim Refael Friedman-4/+4
That is, make the fake number that we return 1 and not 0.
2025-01-26Merge from rustcThe Miri Cronjob Bot-5/+15
2025-01-26Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2025-01-26Don't complete doc(hidden) enum variants and use treesChayim Refael Friedman-55/+102
Also refactor the check a bit.