about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2024-10-04Rollup merge of #131230 - GuillaumeGomez:no-sandbox, r=notriddleGuillaume Gomez-26/+2
Enable `--no-sandbox` option by default for rustdoc GUI tests It's apparently common enough for people to have issues with the `sandbox` mode in chromium, so better disable it by default. r? `@notriddle`
2024-10-04Rollup merge of #131034 - Urgau:cfg-true-false, r=nnethercoteGuillaume Gomez-23/+67
Implement RFC3695 Allow boolean literals as cfg predicates This PR implements https://github.com/rust-lang/rfcs/pull/3695: allow boolean literals as cfg predicates, i.e. `cfg(true)` and `cfg(false)`. r? `@nnethercote` *(or anyone with parser knowledge)* cc `@clubby789`
2024-10-04Avoid dynamic linking to libstd in `command-current-dir` testJakub Beránek-2/+2
2024-10-04Auto merge of #18234 - Veykril:veykril/push-vzynqtlxmrnl, r=Veykrilbors-70/+114
internal: Filter out opaque tokens in some IDE feature macro descensions
2024-10-04Disable -Zdual-proc-macros if the target doesn't support proc-macrosbjorn3-3/+17
2024-10-04Enable `--no-sandbox` option by default for rustdoc GUI testsGuillaume Gomez-26/+2
2024-10-04internal: Filter out opaque tokens in some of IDE feature macro descensionsLukas Wirth-70/+114
2024-10-04clippyRalf Jung-2/+1
2024-10-04Adjust rustdoc for literal boolean supportUrgau-23/+45
2024-10-04Feature gate boolean lit support in cfg predicatesUrgau-0/+22
2024-10-04Merge from rustcThe Miri Cronjob Bot-885/+2514
2024-10-04Preparing for merge from rustcThe Miri Cronjob Bot-1/+1
2024-10-03Rollup merge of #131183 - compiler-errors:opaque-ty-origin, r=estebankMatthias Krüger-8/+7
Refactoring to `OpaqueTyOrigin` Pulled out of a larger PR that uses these changes to do cross-crate encoding of opaque origin, so we can use them for edition 2024 migrations. These changes should be self-explanatory on their own, tho 😄
2024-10-03Auto merge of #131205 - flip1995:clippy-subtree-update, r=Manishearthbors-848/+2484
Clippy subtree update r? `@Manishearth`
2024-10-04update `x install` documentation (#2084)Onur Özkan-12/+14
2024-10-03Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into ↵Philipp Krones-25/+36
clippy-subtree-update
2024-10-03Merge commit 'aa0d551351a9c15d8a95fdb3e2946b505893dda8' into ↵Philipp Krones-848/+2484
clippy-subtree-update
2024-10-03bootstrap: Consolidate editor LSP setupKajetan Puchalski-62/+77
Consolidate LSP setup for different editors into one `./x setup editor`.
2024-10-03Rollup merge of #130419 - nnethercote:streamline-HirCollector, r=GuillaumeGomezMatthias Krüger-22/+10
Streamline `HirCollector` r? `@GuillaumeGomez`
2024-10-03Rename "object safe" to "dyn compatible" (#2083)León Orell Valerian Liehr-3/+3
2024-10-03Do not include `libstd.so` in sysroot when we statically link to libstdJakub Beránek-2/+17
2024-10-03make sure we also detect mixed-size races that begin at different addressesRalf Jung-1/+47
2024-10-03Auto merge of #131185 - workingjubilee:rollup-wkcqe2j, r=workingjubileebors-0/+6
Rollup of 3 pull requests Successful merges: - #126930 (Add unstable support for outputting file checksums for use in cargo) - #130725 (Parser: better error messages for ``@`` in struct patterns) - #131166 (Fix `target_vendor` for `aarch64-nintendo-switch-freestanding`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-03fmtRalf Jung-19/+27
2024-10-03Merge from rustcRalf Jung-1639/+2013
2024-10-03Preparing for merge from rustcRalf Jung-1/+1
2024-10-02Rollup merge of #126930 - Xaeroxe:file-checksum-hint, r=chenyukangJubilee-0/+6
Add unstable support for outputting file checksums for use in cargo Adds an unstable option that appends file checksums and expected lengths to the end of the dep-info file such that `cargo` can read and use these values as an alternative to file mtimes. This PR powers the changes made in this cargo PR https://github.com/rust-lang/cargo/pull/14137 Here's the tracking issue for the cargo feature https://github.com/rust-lang/cargo/issues/14136.
2024-10-03Auto merge of #127912 - joboet:tls_dtor_thread_current, r=cuviperbors-7/+7
std: make `thread::current` available in all `thread_local!` destructors ... and thereby allow the panic runtime to always print the right thread name. This works by modifying the TLS destructor system to schedule a runtime cleanup function after all other TLS destructors registered by `std` have run. Unfortunately, this doesn't affect foreign TLS destructors, `thread::current` will still panic there. Additionally, the thread ID returned by `current_id` will now always be available, even inside the global allocator, and will not change during the lifetime of one thread (this was previously the case with key-based TLS). The mechanisms I added for this (`local_pointer` and `thread_cleanup`) will also allow finally fixing #111272 by moving the signal stack to a similar runtime-cleanup TLS variable.
2024-10-03fixups (#2082)León Orell Valerian Liehr-4/+4
2024-10-02Use named fields for OpaqueTyOriginMichael Goulet-2/+2
2024-10-02Remove redundant in_trait from hir::TyKind::OpaqueDefMichael Goulet-6/+5
2024-10-02epoll: remove extraneous clone of ready_listFrank Rehwinkel-2/+1
A simplification that doesn't impact the epoll implementation's logic. It is not necessary to clone the ready_list before reading its `is_empty` state. This avoids the clone step but more importantly avoids the invisible drop step of the clone.
2024-10-02epoll: add vector clock to the epoll ready_listFrank Rehwinkel-119/+67
This adds a VClock to the epoll implementation's ready_list and has this VClock synced from the thread that updates an event in the ready_list and then has the VClocks of any threads being made runnable again, out of the calls to epoll_wait, synced from it.
2024-10-02epoll: remove unnecessary instructionsFrank Rehwinkel-3/+0
A couple of instructions were left over from an earlier rebase it would seem. They don't impact the logic but the ready_list type is about to change in the next commit. Rather than modify one of these lines in the commit that changes ready_list, only to have these lines removed later on, remove them now. They don't impact the tests results.
2024-10-02epoll: add data_race testFrank Rehwinkel-0/+108
This test demonstrates the need to synchronize the clock of the thread waking up from an epoll_wait from the thread that issued the epoll awake event.
2024-10-02bless miri testsjoboet-7/+7
2024-10-02fix: Join rustfmt overrideCommand with project rootKajetan Puchalski-3/+3
When providing a custom rustfmt command, join it with the project root instead of the workspace root. This fixes rust-analyzer getting the wrong invocation path in projects containing subprojects. This makes the behaviour consistent with how a custom path provided in rust-analyzer.procMacro.server behaves already. Resolves issue #18222
2024-10-02Auto merge of #125771 - Kobzol:ci-datadog-metrics, r=jdnobors-0/+81
[CI] Upload average CPU utilization of CI jobs to DataDog This PR adds a new CI step that uploads the average CPU utilization of the current GH job to Datadog. I want to add more metrics in follow-up PRs. r? `@jdno` try-job: dist-i686-msvc try-job: aarch64-apple try-job: x86_64-gnu-llvm-18
2024-10-02Auto merge of #131117 - AvatarSenju:helpstring-fix, r=onur-ozkanbors-1/+1
Update helper docs display disable option Updated helper docs via configure.py to make it clearer that users can control options with enable and disable Fixing issue #129146
2024-10-01Rollup merge of #131108 - jieyouxu:revert-broken-pipe, r=onur-ozkanJubilee-4/+11
Revert #131060 "Drop conditionally applied cargo `-Zon-broken-pipe=kill` flags" In [#131059] we found out that `-Zon-broken-pipe=kill` is actually **load-bearing**[^1] for (at least) `rustc` and `rustdoc` to have the kill-process-on-broken-pipe behavior, e.g. `rustc --print=sysroot | false` will ICE and `rustdoc --print=sysroot | false` will panic on a broken pipe. This PR reverts 5a7058c5a542ec42d1fa9b524f7b4f7d6845d1e9 (reverts PR #131060) in favor of a future fix to *unconditionally* apply `-Zon-broken-pipe=kill` to tool builds and also not drop the `-Zon-broken-pipe=kill` flag for rustc binary builds. I could not figure out how to write a regression test for the `rustc --print=sysroot | false` behavior on Unix, so this is a plain revert for now. This revert will unfortunately reintroduce #130980 until we fix it again with the different approach. See more details at <https://github.com/rust-lang/rust/issues/131059#issuecomment-2385822033> and in the timeline below. ### Timeline of kill-process-on-broken-pipe behavior changes See [`unix_sigpipe` tracking issue #97889][#97889] for more context around unix sigpipe handling. - From the very beginning since 2014, Rust binaries by default use `sig_ign`. This meant that if output pipe is broken yet the program tries to use `println!` and such, there will be a broken pipe panic from std. This lead to ICEs from e.g. `rustc --help | false` [#34376]. - [#49606] mitigated [#34376] by adding an explicit signal handler to `rustc_driver` register a sigpipe handler with `SIG_DFL` which will cause the binary using `rustc_driver` to terminate if `rustc_driver::set_sigpipe_handler()` is called. `rustc`'s main binary wrapper uses `rustc_driver::set_sigpipe_handler()`, and so does `rustdoc`. - A more universal way to set sigpipe behavior for Unix was introduced as part of [#97889], i.e. `# [unix_sigpipe = "sig_dfl"]` attribute. - [#102587] migrated `rustc` to use `#[unix_sigpipe = "sig_dfl"]` instead of `rustc_driver::set_sigpipe_handler`. - [#103495] migrated `rustdoc` to use `#[unix_sigpipe = "sig_dfl"]` instead of `rustc_driver::set_sigpipe_handler`. `rustc_driver::set_sigpipe_handler` was removed. - Following concerns about sigpipe setting UI in [#97889], the UI for specifying sigpipe behavior was changed in [#124480] from `#[unix_sigpipe = "sig_dfl"]` attribute to the commmand line flag `-Zon-broken-pipe=kill`. - In the same PR, `#[unix_sigpipe = "sig_dfl"]` were removed from `rustc` and `rustdoc` main binary crate entry points in favor of the command line flag. Kill-process-on-broken-pipe behavior was preserved by adding `-Zon-broken-pipe=kill` for `rustdoc` tool build step and `rustc` during compile steps. - [#126934] added `-Zon-broken-pipe=kill` for tool builds *except* for cargo to help with some miri tests because at the time the PR was written, this would lead to a couple of cargo test failures. Conditionally setting `RUSTFLAGS` can lead to tool build invalidation, e.g. building `cargo` without `-Zon-broken-pipe=kill` but `clippy` with the flag can lead to invalidation of the tool build cache. This is not a problem at the time, because nothing (not even miri) tests built stage 1 cargo (all used initial cargo). - In [#130634] we found out that `run-make` tests like `compiler-builtins` needed stage 1 cargo, not just beta bootstrap cargo, because there can be changes that are present in stage 1 cargo but absent in beta cargo, which was blocking a beta backport. - [#130642] and later [#130739] now build stage 1 cargo. And as previously mentioned, since `-Zon-broken-pipe=kill` was specifically *not* set for cargo, this caused tool build cache invalidation meaning rebuilds of stage 1 even if nothing in source was changed due to differing `RUSTFLAGS` since `run-make` also builds `rustdoc` and such [#130980]. [#34376]: https://github.com/rust-lang/rust/issues/34376 [#49606]: https://github.com/rust-lang/rust/pull/49606 [#97889]: https://github.com/rust-lang/rust/issues/97889 [#102587]: https://github.com/rust-lang/rust/pull/102587 [#103495]: https://github.com/rust-lang/rust/pull/103495 [#124480]: https://github.com/rust-lang/rust/pull/124480 [#130634]: https://github.com/rust-lang/rust/issues/130634 [#130642]: https://github.com/rust-lang/rust/pull/130642 [#130739]: https://github.com/rust-lang/rust/pull/130739 [#130980]: https://github.com/rust-lang/rust/issues/130980 [#131059]: https://github.com/rust-lang/rust/issues/131059 [^1]: https://github.com/rust-lang/rust/issues/131059#issuecomment-2385822033 r? ``@onur-ozkan`` (or bootstrap)
2024-10-01Rollup merge of #130885 - RalfJung:interp-error-discard, r=oli-obkJubilee-729/+740
panic when an interpreter error gets unintentionally discarded One important invariant of Miri is that when an interpreter error is raised (*in particular* a UB error), those must not be discarded: it's not okay to just check `foo().is_err()` and then continue executing. This seems to catch new contributors by surprise fairly regularly, so this PR tries to make it so that *if* this ever happens, we get a panic rather than a silent missed UB bug. The interpreter error type now contains a "guard" that panics on drop, and that is explicitly passed to `mem::forget` when an error is deliberately discarded. Fixes https://github.com/rust-lang/miri/issues/3855
2024-10-01add unstable support for outputting file checksums for use in cargoJacob Kiesel-0/+6
2024-10-01fix: correctly parse `use` in generic parametersSabrinaJewson-1/+29
2024-10-02Update helper docs display disable optionAnushrut-1/+1
Updated helper docs via configure.py to make it clearer that users can control options with enable and disable
2024-10-01make InterpResult a dedicated type to avoid accidentally discarding the errorRalf Jung-733/+739
2024-10-01Auto merge of #131111 - matthiaskrgr:rollup-n6do187, r=matthiaskrgrbors-12/+51
Rollup of 4 pull requests Successful merges: - #130005 (Replace -Z default-hidden-visibility with -Z default-visibility) - #130229 (ptr::add/sub: do not claim equivalence with `offset(c as isize)`) - #130773 (Update Unicode escapes in `/library/core/src/char/methods.rs`) - #130933 (rustdoc: lists items that contain multiple paragraphs are more clear) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-01Rollup merge of #130933 - lolbinarycat:rustdoc-li-p, r=GuillaumeGomez,notriddleMatthias Krüger-0/+7
rustdoc: lists items that contain multiple paragraphs are more clear fixes https://github.com/rust-lang/rust/issues/130622 before: ![before](https://github.com/user-attachments/assets/fe54d8ee-8a1a-45fc-9434-2737c5c6f4d5) after: ![after](https://github.com/user-attachments/assets/095be365-1bfc-4001-8664-59bc4125bb05)
2024-10-01Rollup merge of #130005 - davidlattimore:protected-vis-flag, r=UrgauMatthias Krüger-12/+44
Replace -Z default-hidden-visibility with -Z default-visibility Issue #105518
2024-10-01Revert "Drop conditionally applied cargo `-Zon-broken-pipe=kill` flags"许杰友 Jieyou Xu (Joe)-4/+11
This reverts commit 5a7058c5a542ec42d1fa9b524f7b4f7d6845d1e9. In [#131059] we found out that `-Zon-broken-pipe=kill` is actually **load-bearing** [1] for (at least) `rustc` and `rustdoc` to have the kill-process-on-broken-pipe behavior, e.g. `rustc --print=sysroot | false` will ICE and `rustdoc --print=sysroot | false` will panic on a broken pipe. [#131059]: https://github.com/rust-lang/rust/issues/131059 [1]: https://github.com/rust-lang/rust/issues/131059#issuecomment-2385822033
2024-10-01Remove crashes and fix testsMichael Goulet-10/+0