about summary refs log tree commit diff
path: root/src/tools
AgeCommit message (Collapse)AuthorLines
2024-05-22internal: refactor `prefer_no_std`/`prefer_prelude` bools into a structDavid Barsky-351/+304
2024-05-22Rewrite `core-no-oom-handling` as rmake.rsOneirical-2/+8
2024-05-23fix: check pseudo-block by local_id instead of ModuleOriginroife-5/+3
2024-05-22Auto merge of #17277 - Veykril:find-path-fixes, r=Veykrilbors-346/+647
fix: Various find path fixes Fixes https://github.com/rust-lang/rust-analyzer/issues/17271
2024-05-22Rollup merge of #124896 - RalfJung:miri-intrinsic-fallback, r=oli-obkLeón Orell Valerian Liehr-18/+18
miri: rename intrinsic_fallback_checks_ub to intrinsic_fallback_is_spec Checking UB is not the only concern, we also have to make sure we are not losing out on non-determinism. r? ``@oli-obk`` (not urgent, take your time)
2024-05-22solaris/illumos localtime_r / clock_getime support enabled.David Carlier-29/+44
clock_gettime support CLOCK_REALTIME/CLOCK_MONOTONIC clockid_t. localtime_r is supported only tm struct is more limited than other supported platforms.
2024-05-22rustc: Use `tcx.used_crates(())` moreVadim Petrochenkov-3/+3
And explain when it should be used.
2024-05-22Auto merge of #17279 - Veykril:format_args-escape, r=Veykrilbors-6/+18
fix: Fix format_args lowering passing incorrect parameters to `rustc_parse_format`
2024-05-22fix: Fix format_args lowering passing incorrect parameters to rustc_parse_formatLukas Wirth-6/+18
2024-05-22Auto merge of #117329 - RalfJung:offset-by-zero, r=oli-obk,scottmcmbors-327/+64
offset: allow zero-byte offset on arbitrary pointers As per prior `@rust-lang/opsem` [discussion](https://github.com/rust-lang/opsem-team/issues/10) and [FCP](https://github.com/rust-lang/unsafe-code-guidelines/issues/472#issuecomment-1793409130): - Zero-sized reads and writes are allowed on all sufficiently aligned pointers, including the null pointer - Inbounds-offset-by-zero is allowed on all pointers, including the null pointer - `offset_from` on two pointers derived from the same allocation is always allowed when they have the same address This removes surprising UB (in particular, even C++ allows "nullptr + 0", which we currently disallow), and it brings us one step closer to an important theoretical property for our semantics ("provenance monotonicity": if operations are valid on bytes without provenance, then adding provenance can't make them invalid). The minimum LLVM we require (v17) includes https://reviews.llvm.org/D154051, so we can finally implement this. The `offset_from` change is needed to maintain the equivalence with `offset`: if `let ptr2 = ptr1.offset(N)` is well-defined, then `ptr2.offset_from(ptr1)` should be well-defined and return N. Now consider the case where N is 0 and `ptr1` dangles: we want to still allow offset_from here. I think we should change offset_from further, but that's a separate discussion. Fixes https://github.com/rust-lang/rust/issues/65108 [Tracking issue](https://github.com/rust-lang/rust/issues/117945) | [T-lang summary](https://github.com/rust-lang/rust/pull/117329#issuecomment-1951981106) Cc `@nikic`
2024-05-22Auto merge of #17248 - mladedav:dm/delay-clear, r=Veykrilbors-1/+10
Clear diagnostics only after new ones were received Closes #15934 This adds a flag inside the global state which controls when old diagnostics are cleared. Now, old diagnostics should be cleared only after at least one new diagnostic is available.
2024-05-22Auto merge of #17268 - Veykril:signatures, r=Veykrilbors-226/+388
feat: More callable info With this PR we retain more info about callables other than functions, allowing for closure parameter type inlay hints to be linkable as well as better signature help around closures and `Fn*` implementors.
2024-05-22Update assists test fixturesLukas Wirth-29/+18
2024-05-22expectify find_path testsLukas Wirth-184/+447
2024-05-22fix: Fix general find-path inconsistenciesLukas Wirth-193/+242
2024-05-22Migrate `run-make/rustdoc-scrape-examples-macros` to `rmake.rs`Guillaume Gomez-1/+0
2024-05-22clippyRalf Jung-8/+10
2024-05-22Merge from rustcRalf Jung-4136/+9622
2024-05-22Preparing for merge from rustcRalf Jung-1/+1
2024-05-22Auto merge of #125387 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 9 commits in 0de7f2ec6c39d68022e6b97a39559d2f4dbf3930..84dc5dc11a9007a08f27170454da6097265e510e 2024-05-17 16:54:54 +0000 to 2024-05-20 18:57:08 +0000 - Fix warning about unused Permissions (rust-lang/cargo#13938) - fix: support IPv6-only network for cargo fix (rust-lang/cargo#13907) - Load `libsecret` by its `SONAME`, `libsecret-1.so.0` (rust-lang/cargo#13927) - docs(ref): Simplify check-cfg build.rs docs (rust-lang/cargo#13937) - Make `git::use_the_cli` test truly locale independent (rust-lang/cargo#13935) - Silence warnings running embedded unittests. (rust-lang/cargo#13929) - Fix warning output in build_with_symlink_to_path_dependency_with_build_script_in_git (rust-lang/cargo#13930) - Fix: Make path dependencies with the same name stays locked (rust-lang/cargo#13572) - Temporarily fix standard_lib tests on linux. (rust-lang/cargo#13931) r? ghost
2024-05-21Auto merge of #125202 - flip1995:clippy-subtree-update, r=Manishearthbors-1120/+4025
Clippy subtree update r? `@Manishearth`
2024-05-21Update cargoWeihang Lo-0/+0
2024-05-22The number of tests does not depend on the architecture's pointer widthTobias Bucher-4/+4
Use `u32` instead of `usize` for counting them.
2024-05-21tidy: stop special-casing tests/ui entry limitJubilee Young-13/+2
2024-05-21Rollup merge of #125357 - ↵Matthias Krüger-1/+0
GuillaumeGomez:migrate-rustdoc-scrape-examples-multiple, r=jieyouxu Migrate `run-make/rustdoc-scrape-examples-multiple` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? ```@jieyouxu```
2024-05-21Rollup merge of #125310 - workingjubilee:muck-out-the-test-stables, r=NilstriebMatthias Krüger-1/+1
Move ~100 tests from tests/ui to subdirs new dirs for some, the rest in old sweep tests up before they turn cold to stop our code from growing mold
2024-05-21Merge commit '2efebd2f0c03dabbe5c3ad7b4ebfbd99238d1fb2' into ↵Philipp Krones-1120/+4025
clippy-subtree-update
2024-05-21don't inhibit random field reordering on repr(packed(1))Ralf Jung-3/+3
2024-05-21interpret: make overflowing binops just normal binopsRalf Jung-90/+88
2024-05-21Auto merge of #125358 - matthiaskrgr:rollup-mx841tg, r=matthiaskrgrbors-1/+17
Rollup of 7 pull requests Successful merges: - #124570 (Miscellaneous cleanups) - #124772 (Refactor documentation for Apple targets) - #125011 (Add opt-for-size core lib feature flag) - #125218 (Migrate `run-make/no-intermediate-extras` to new `rmake.rs`) - #125225 (Use functions from `crt_externs.h` on iOS/tvOS/watchOS/visionOS) - #125266 (compiler: add simd_ctpop intrinsic) - #125348 (Small fixes to `std::path::absolute` docs) Failed merges: - #125296 (Fix `unexpected_cfgs` lint on std) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-21test: add tests for extern preludes resolving in local modsroife-0/+62
2024-05-21Rollup merge of #125266 - workingjubilee:stream-plastic-love, r=RalfJung,nikicMatthias Krüger-0/+17
compiler: add simd_ctpop intrinsic Fairly straightforward addition. cc `@rust-lang/opsem` new (extremely boring) intrinsic
2024-05-21Rollup merge of #125218 - Oneirical:easy-test-the-third, r=jieyouxuMatthias Krüger-1/+0
Migrate `run-make/no-intermediate-extras` to new `rmake.rs` Part of #121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html).
2024-05-21Auto merge of #124097 - compiler-errors:box-into-iter, r=WaffleLapkinbors-37/+29
Add `IntoIterator` for `Box<[T]>` + edition 2024-specific lints * Adds a similar method probe opt-out mechanism to the `[T;N]: IntoIterator` implementation for edition 2021. * Adjusts the relevant lints (shadowed `.into_iter()` calls, new source of method ambiguity). * Adds some tests. * Took the liberty to rework the logic in the `ARRAY_INTO_ITER` lint, since it was kind of confusing. Based mostly off of #116607. ACP: rust-lang/libs-team#263 References #59878 Tracking for Rust 2024: https://github.com/rust-lang/rust/issues/123759 Crater run was done here: https://github.com/rust-lang/rust/pull/116607#issuecomment-1770293013 Consensus afaict was that there is too much breakage, so let's do this in an edition-dependent way much like `[T; N]: IntoIterator`.
2024-05-21Migrate `run-make/rustdoc-scrape-examples-multiple` to `rmake.rs`Guillaume Gomez-1/+0
2024-05-20Move 100 entries from tests/ui into subdirsJubilee Young-1/+1
- Move super-fast-paren-parsing test into ui/parser - Move stmt_expr_attrs test into ui/feature-gates - Move macro tests into ui/macros - Move global_asm tests into ui/asm - Move env tests into ui/process - Move xcrate tests into ui/cross-crate - Move unop tests into ui/unop - Move backtrace tests into ui/backtrace - Move check-static tests into ui/statics - Move expr tests into ui/expr - Move optimization fuel tests into ui/fuel - Move ffi attribute tests into ui/ffi-attrs - Move suggestion tests into ui/suggestions - Move main tests into ui/fn-main - Move lint tests into ui/lint - Move repr tests into ui/repr - Move intrinsics tests into ui/intrinsics - Move tool lint tests into ui/tool-attributes - Move return tests into ui/return - Move pattern tests into ui/patttern - Move range tests into ui/range - Move foreign-fn tests into ui/foreign - Move orphan-check tests into ui/coherence - Move inference tests into ui/inference - Reduce ROOT_ENTRY_LIMIT
2024-05-20Fix miri tooMichael Goulet-3/+3
2024-05-20Remove a clippy test that doesn't apply anymoreMichael Goulet-34/+26
2024-05-20Auto merge of #125166 - lovesegfault:embed-rustc-perf, r=Mark-Simulacrumbors-45/+18
refactor: add rustc-perf submodule to src/tools Currently, it's very challenging to perform a sandboxed `opt-dist` bootstrap because the tool requires `rustc-perf` to be present, but there is no proper management/tracking of it. Instead, a specific commit is hardcoded where it is needed, and a non-checksummed zip is fetched ad-hoc. This happens in two places: `src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile`: ```dockerfile ENV PERF_COMMIT 4f313add609f43e928e98132358e8426ed3969ae RUN curl -LS -o perf.zip https://ci-mirrors.rust-lang.org/rustc/rustc-perf-$PERF_COMMIT.zip && \ unzip perf.zip && \ mv rustc-perf-$PERF_COMMIT rustc-perf && \ rm perf.zip ``` `src/tools/opt-dist/src/main.rs` ```rust // FIXME: add some mechanism for synchronization of this commit SHA with // Linux (which builds rustc-perf in a Dockerfile) // rustc-perf version from 2023-10-22 const PERF_COMMIT: &str = "4f313add609f43e928e98132358e8426ed3969ae"; let url = format!("https://ci-mirrors.rust-lang.org/rustc/rustc-perf-{PERF_COMMIT}.zip"); let client = reqwest::blocking::Client::builder() .timeout(Duration::from_secs(60 * 2)) .connect_timeout(Duration::from_secs(60 * 2)) .build()?; let response = retry_action( || Ok(client.get(&url).send()?.error_for_status()?.bytes()?.to_vec()), "Download rustc-perf archive", 5, )?; ``` This causes a few issues: 1. Maintainers need to be careful to bump PERF_COMMIT in both places every time 2. In order to run `opt-dist` in a sandbox, you need to provide your own `rustc-perf` (https://github.com/rust-lang/rust/pull/125125), but to figure out which commit to provide you need to grep the Dockerfile 3. Even if you manage to provide the correct `rustc-perf`, its dependencies are not included in the `vendor/` dir created during `dist`, so it will fail to build from the published source tarballs 4. It is hard to provide any level of automation around updating the `rustc-perf` in use, leading to staleness Fundamentally, this means `rustc-src` tarballs no longer contain everything you need to bootstrap Rust, and packagers hoping to leverage `opt-dist` need to go out of their way to keep track of this "hidden" dependency on `rustc-perf`. This change adds rustc-perf as a git submodule, pinned to the current `PERF_COMMIT` 4f313add609f43e928e98132358e8426ed3969ae. Subsequent commits ensure the submodule is initialized when necessary, and make use of it in `opt-dist`.
2024-05-20Rollup merge of #125318 - ↵Matthias Krüger-1/+0
GuillaumeGomez:migrate-rustdoc-examples-whitespaces, r=jieyouxu Migrate `run-make/rustdoc-scrape-examples-whitespace` to `rmake.rs` Part of https://github.com/rust-lang/rust/issues/121876. r? `@jieyouxu`
2024-05-20Rollup merge of #125173 - scottmcm:never-checked, r=davidtwcoMatthias Krüger-3/+3
Remove `Rvalue::CheckedBinaryOp` Zulip conversation: <https://rust-lang.zulipchat.com/#narrow/stream/189540-t-compiler.2Fwg-mir-opt/topic/intrinsics.20vs.20binop.2Funop/near/438729996> cc `@RalfJung` While it's a draft, r? ghost
2024-05-20refactor(opt-dist): use rustc-perf from rustc checkoutBernardo Meurer Costa-45/+14
This replaces the hardcoded rustc-perf commit and ad-hoc downloading and unpacking of its zipped source with defaulting to use the new rustc-perf submodule. While it would be nice to make `opt-dist` able to initialize the submodule automatically when pointing to a Rust checkout _other_ than the one opt-dist was built in, that would require a bigger refactor that moved `update_submodule`, from bootstrap, into build_helper. Regardless, I imagine it must be quite rare to use `opt-dist` with a checkout that is neither from a rust-src tarball (which will contain the submodule), nor the checkout opt-dist itself was built (bootstrap will update the submodule when opt-dist is built).
2024-05-20refactor: add rustc-perf submodule to src/toolsBernardo Meurer Costa-0/+4
Currently, it's very challenging to perform a sandboxed `opt-dist` bootstrap because the tool requires `rustc-perf` to be present, but there is no proper management/tracking of it. Instead, a specific commit is hardcoded where it is needed, and a non-checksummed zip is fetched ad-hoc. This happens in two places: `src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile`: ```dockerfile ENV PERF_COMMIT 4f313add609f43e928e98132358e8426ed3969ae RUN curl -LS -o perf.zip https://ci-mirrors.rust-lang.org/rustc/rustc-perf-$PERF_COMMIT.zip && \ unzip perf.zip && \ mv rustc-perf-$PERF_COMMIT rustc-perf && \ rm perf.zip ``` `src/tools/opt-dist/src/main.rs` ```rust // FIXME: add some mechanism for synchronization of this commit SHA with // Linux (which builds rustc-perf in a Dockerfile) // rustc-perf version from 2023-10-22 const PERF_COMMIT: &str = "4f313add609f43e928e98132358e8426ed3969ae"; let url = format!("https://ci-mirrors.rust-lang.org/rustc/rustc-perf-{PERF_COMMIT}.zip"); let client = reqwest::blocking::Client::builder() .timeout(Duration::from_secs(60 * 2)) .connect_timeout(Duration::from_secs(60 * 2)) .build()?; let response = retry_action( || Ok(client.get(&url).send()?.error_for_status()?.bytes()?.to_vec()), "Download rustc-perf archive", 5, )?; ``` This causes a few issues: 1. Maintainers need to be careful to bump PERF_COMMIT in both places every time 2. In order to run `opt-dist` in a sandbox, you need to provide your own `rustc-perf` (https://github.com/rust-lang/rust/pull/125125), but to figure out which commit to provide you need to grep the Dockerfile 3. Even if you manage to provide the correct `rustc-perf`, its dependencies are not included in the `vendor/` dir created during `dist`, so it will fail to build from the published source tarballs 4. It is hard to provide any level of automation around updating the `rustc-perf` in use, leading to staleness Fundamentally, this means `rustc-src` tarballs no longer contain everything you need to bootstrap Rust, and packagers hoping to leverage `opt-dist` need to go out of their way to keep track of this "hidden" dependency on `rustc-perf`. This change adds rustc-perf as a git submodule, pinned to the current `PERF_COMMIT` 4f313add609f43e928e98132358e8426ed3969ae. Subsequent commits ensure the submodule is initialized when necessary, and make use of it in `opt-dist`.
2024-05-20Migrate `run-make/rustdoc-scrape-examples-whitespace` to `rmake.rs`Guillaume Gomez-1/+0
2024-05-20Use `throw_unsup_format` instead of returning `ENOTSUP` in the mmap shimmarc0246-42/+15
2024-05-19miri: support simd_ctpopJubilee Young-0/+17
2024-05-19Auto merge of #125294 - matthiaskrgr:rollup-w42c829, r=matthiaskrgrbors-629/+1321
Rollup of 4 pull requests Successful merges: - #124948 (chore: Remove repeated words (extension of #124924)) - #124992 (Add example to IsTerminal::is_terminal) - #125279 (make `Debug` impl for `Term` simpler) - #125286 (Miri subtree update) r? `@ghost` `@rustbot` modify labels: rollup
2024-05-19Rollup merge of #125286 - RalfJung:miri-sync, r=RalfJungMatthias Krüger-604/+1296
Miri subtree update r? `@ghost`
2024-05-19Rollup merge of #124948 - blyxyas:remove-repeated-words, r=compiler-errorsMatthias Krüger-25/+25
chore: Remove repeated words (extension of #124924) When I saw #124924 I thought "Hey, I'm sure that there are far more than just two typos of this nature in the codebase". So here's some more typo-fixing. Some found with regex, some found with a spellchecker. Every single one manually reviewed by me (along with hundreds of false negatives by the tools)
2024-05-19Auto merge of #125006 - spastorino:generics-is-empty, r=compiler-errorsbors-2/+2
Add and use generics.is_empty() and generics.is_own_empty, rather than using generics' attributes r? `@compiler-errors` Related to #123929