about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-10-11move dummy commit logic into x86_64-gnu-llvm-18onur-ozkan-17/+19
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-10Auto merge of #131466 - matthiaskrgr:rollup-3qtz83x, r=matthiaskrgrbors-54/+1647
Rollup of 7 pull requests Successful merges: - #123951 (Reserve guarded string literals (RFC 3593)) - #130827 (Library: Rename "object safe" to "dyn compatible") - #131383 (Add docs about slicing slices at the ends) - #131403 (Fix needless_lifetimes in rustc_serialize) - #131417 (Fix methods alignment on mobile) - #131449 (Decouple WASIp2 sockets from WasiFd) - #131462 (Mention allocation errors for `open_buffered`) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-09Auto merge of #131458 - matthiaskrgr:rollup-82qeotv, r=matthiaskrgrbors-54/+572
Rollup of 7 pull requests Successful merges: - #131382 (Add "reference" as a known compiletest header) - #131420 (Dont ICE when encountering post-mono layout cycle error) - #131424 (compiler: Stop reexporting enum-globs from `rustc_target::abi`) - #131426 (Fix quotation marks around debug line in `src/ci/run.sh`) - #131435 (Ignore broken-pipe-no-ice on apple (specifically macOS) for now) - #131447 (add more crash tests) - #131456 (Fix typo in E0793) r? `@ghost` `@rustbot` modify labels: rollup
2024-10-09Rollup merge of #131462 - cuviper:open_buffered-error, r=RalfJungMatthias Krüger-1/+2
Mention allocation errors for `open_buffered` This documents that `File::open_buffered` may return an error on allocation failure.
2024-10-09Rollup merge of #131449 - nickrum:wasip2-net-decouple-fd, r=alexcrichtonMatthias Krüger-18/+58
Decouple WASIp2 sockets from WasiFd This is a follow up to #129638, decoupling WASIp2's socket implementation from WASIp1's `WasiFd` as discussed with `@alexcrichton.` Quite a few trait implementations in `std::os::fd` rely on the fact that there is an additional layer of abstraction between `Socket` and `OwnedFd`. I thus had to add a thin `WasiSocket` wrapper struct that just "forwards" to `OwnedFd`. Alternatively, I could have added a lot of conditional compilation to `std::os::fd`, which feels even worse. Since `WasiFd::sock_accept` is no longer accessible from `TcpListener` and since WASIp2 has proper support for accepting sockets through `Socket::accept`, the `std::os::wasi::net` module has been removed from WASIp2, which only contains a single `TcpListenerExt` trait with a `sock_accept` method as well as an implementation for `TcpListener`. Let me know if this is an acceptable solution.
2024-10-09Rollup merge of #131417 - GuillaumeGomez:mobile-methods-left-margin, r=notriddleMatthias Krüger-3/+23
Fix methods alignment on mobile I realized that on mobile, the methods are not aligned the same depending if they have documentation or not: | before | after | |-|-| | ![Screenshot from 2024-10-08 20-40-22](https://github.com/user-attachments/assets/d31ba5e1-cf84-431f-9b2b-9962bc5a0365) | ![image](https://github.com/user-attachments/assets/ffde2161-bfcb-4462-8c5b-88538e61b366) | r? `@notriddle`
2024-10-09Rollup merge of #131403 - practicalrs:fix_needless_lifetimes_p2, r=petrochenkovMatthias Krüger-3/+3
Fix needless_lifetimes in rustc_serialize Hi, This PR fixes the following clipy warnings: ``` warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:328:6 | 328 | impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 328 - impl<'a, S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'a, [T]> 328 + impl<S: Encoder, T: Encodable<S>> Encodable<S> for Cow<'_, [T]> | warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:348:6 | 348 | impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 348 - impl<'a, S: Encoder> Encodable<S> for Cow<'a, str> { 348 + impl<S: Encoder> Encodable<S> for Cow<'_, str> { | warning: the following explicit lifetimes could be elided: 'a --> compiler/rustc_serialize/src/serialize.rs:355:6 | 355 | impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 355 - impl<'a, D: Decoder> Decodable<D> for Cow<'a, str> { 355 + impl<D: Decoder> Decodable<D> for Cow<'_, str> { ``` Best regards, Michal
2024-10-09Rollup merge of #131383 - ↵Matthias Krüger-0/+21
AngelicosPhosphoros:better_doc_for_slice_slicing_at_ends, r=cuviper Add docs about slicing slices at the ends Closes https://github.com/rust-lang/rust/issues/60783
2024-10-09Rollup merge of #130827 - fmease:library-mv-obj-save-dyn-compat, r=ibraheemdevMatthias Krüger-20/+26
Library: Rename "object safe" to "dyn compatible" Completed T-lang FCP: https://github.com/rust-lang/lang-team/issues/286#issuecomment-2338905118. Tracking issue: https://github.com/rust-lang/rust/issues/130852 Regarding https://github.com/rust-lang/rust/labels/relnotes, I guess I will manually open a https://github.com/rust-lang/rust/labels/relnotes-tracking-issue since this change affects everything (compiler, library, tools, docs, books, everyday language). r? ghost
2024-10-09Rollup merge of #123951 - pitaj:reserve-guarded-strings, r=traviscrossMatthias Krüger-9/+1514
Reserve guarded string literals (RFC 3593) Implementation for RFC 3593, including: - lexer / parser changes - diagnostics - migration lint - tests We reserve `#"`, `##"`, `###"`, `####`, and any other string of four or more repeated `#`. This avoids infinite lookahead in the lexer, though we still use infinite lookahead in the parser to provide better forward compatibility diagnostics. This PR does not implement any special lexing of the string internals: - strings preceded by one or more `#` are denied - regardless of the number of trailing `#` - string contents are lexed as if it was just a bare `"string"` Tracking issue: #123735 RFC: rust-lang/rfcs#3593
2024-10-09Auto merge of #131461 - onur-ozkan:ignore-ci-rustc-change-test, r=onur-ozkanbors-0/+2
ignore `ci_rustc_if_unchanged_logic` test Temporary hotfix for unblocking CI. r? ghost
2024-10-09ignore `ci_rustc_if_unchanged_logic` testonur-ozkan-0/+2
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-09Mention allocation errors for `open_buffered`Josh Stone-1/+2
2024-10-09Strengthen some GUI testsGuillaume Gomez-0/+3
2024-10-09Add GUI regression test for methods left margin on mobileGuillaume Gomez-0/+17
2024-10-09Fix methods alignment on mobileGuillaume Gomez-3/+3
2024-10-09Rollup merge of #131456 - kupiakos:patch-3, r=compiler-errorsMatthias Krüger-1/+1
Fix typo in E0793 `s/references/reference/`
2024-10-09Rollup merge of #131447 - matthiaskrgr:morecrashtests, r=compiler-errorsMatthias Krüger-0/+343
add more crash tests r? `@jieyouxu`
2024-10-09Rollup merge of #131435 - jieyouxu:macos-pipe, r=ZalatharMatthias Krüger-0/+6
Ignore broken-pipe-no-ice on apple (specifically macOS) for now This test fails for me locally (initially reported by Zalathar) because apparently on macOS it doesn't say "internal compiler error" but it does report the std I/O panic, and it doesn't exit with a code of 101 but instead terminates with a wait signal of SIGPIPE. Ignore this test on apple for now, until we try to actually address the underlying issue. See https://github.com/rust-lang/rust/pull/131155 and https://github.com/rust-lang/rust/issues/131436 for more context.
2024-10-09Rollup merge of #131426 - cuviper:ci-debug-quotes, r=jieyouxuMatthias Krüger-1/+1
Fix quotation marks around debug line in `src/ci/run.sh` Without this change, the markdown-style backticks are treated as a shell command substitution, which fails like so: /checkout/src/ci/run.sh: line 58: DISABLE_CI_RUSTC_IF_INCOMPATIBLE: command not found debug: configured. r? onur-ozkan
2024-10-09Rollup merge of #131424 - workingjubilee:stem-the-tyde-of-glob-imports, ↵Matthias Krüger-47/+91
r=jieyouxu compiler: Stop reexporting enum-globs from `rustc_target::abi` Three enums had **all** their variants glob-exported into a distressingly large amount of the tree. Cease to do that, and also cease to glob import the contents of the module that contained them. Redirect relevant imports to their actual source, the `rustc_abi` crate. No functional changes.
2024-10-09Rollup merge of #131420 - compiler-errors:post-mono-layout-cycle, r=wesleywiserMatthias Krüger-5/+129
Dont ICE when encountering post-mono layout cycle error It's possible to encounter post-mono layout cycle errors in `fn_abi_of_instance`. Don't ICE in those cases. This was originally discovered in an async fn, but that's not the only way to encounter such an error (which the other test I added should demonstrate). Error messsages suck, but this fix is purely about suppressing the ICE. Fixes #131409
2024-10-09Rollup merge of #131382 - ehuss:compiletest-reference, r=jieyouxuMatthias Krüger-0/+1
Add "reference" as a known compiletest header This adds the "reference" compiletest header so that the Rust reference can add annotations to the test suite in order to link tests to individual rules in the reference. Tooling in the reference repo will be responsible for collecting these annotations and linking to the tests. More details are in MCP 783: https://github.com/rust-lang/compiler-team/issues/783 There is a change from the MCP in that I am not adding the JSON collection to compiletest (at least, not yet). In looking at this more closely, that actually makes things more difficult for our tooling, so I'm leaving it out for now. If in the future it looks like something we want, then I think we can add it later. There are a few tests here which need adjusting due to the legacy header check. `@jieyouxu` indicated on Zulip that we could potentially remove the legacy header check, in which case those changes can be dropped from this PR. r? `@jieyouxu`
2024-10-09Fix typo in E0793Alyssa Haroldsen-1/+1
2024-10-09Library: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-20/+26
2024-10-09add more crash testsMatthias Krüger-0/+343
2024-10-09Add "reference" as a known compiletest headerEric Huss-0/+1
This adds the "reference" compiletest header so that the Rust reference can add annotations to the test suite in order to link tests to individual rules in the reference. Tooling in the reference repo will be responsible for collecting these annotations and linking to the tests. More details are in MCP 783: https://github.com/rust-lang/compiler-team/issues/783
2024-10-09Decouple WASIp2 sockets from WasiFdNicola Krumschmidt-18/+58
2024-10-09Auto merge of #131429 - Zalathar:needs-profiler-runtime, r=jieyouxubors-37/+35
Rename directive `needs-profiler-support` to `needs-profiler-runtime` The rest of the compiler mostly refers to this as `profiler_runtime`, so having a directive named `needs-profiler-support` was causing a lot of confusion. r? jieyouxu
2024-10-09No need to cache the `profiler_runtime` flagZalathar-3/+1
This cache struct entry was a relic from when profiler availability was communicated via an environment variable rather than a command-line flag.
2024-10-09Rename `profiler_support` to `profiler_runtime` throughout compiletestZalathar-19/+19
2024-10-09Rename directive `needs-profiler-support` to `needs-profiler-runtime`Zalathar-18/+18
2024-10-09Ignore broken-pipe-no-ice on apple for now许杰友 Jieyou Xu (Joe)-0/+6
2024-10-09Auto merge of #131434 - onur-ozkan:fix-if-unchanged-test, r=onur-ozkanbors-1/+1
fix `ci_rustc_if_unchanged_logic` test Kind a typo from https://github.com/rust-lang/rust/pull/122709, which makes `ci_rustc_if_unchanged_logic` test to fail in any PR that has a change in "library" tree (e.g., https://github.com/rust-lang/rust/pull/131418#issuecomment-2400878904). This fixes that. r? ghost
2024-10-09fix `ci_rustc_if_unchanged_logic` testonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-10-09Auto merge of #131421 - weihanglo:update-cargo, r=weihanglobors-0/+3
Update cargo 8 commits in ad074abe3a18ce8444c06f962ceecfd056acfc73..15fbd2f607d4defc87053b8b76bf5038f2483cf4 2024-10-04 18:18:15 +0000 to 2024-10-08 21:08:11 +0000 - initial version of checksum based freshness (rust-lang/cargo#14137) - feat: Add custom completer for completing registry name (rust-lang/cargo#14656) - Document build-plan as being deprecated (rust-lang/cargo#14657) - fix(complete): Don't complete files for any value (rust-lang/cargo#14653) - Add more SAT resolver tests (rust-lang/cargo#14614) - fix: avoid inserting duplicate `dylib_path_envvar` when calling `cargo run` recursively (rust-lang/cargo#14464) - chore(deps): bump gix-path from 0.10.9 to 0.10.11 (rust-lang/cargo#14489) - improve error reporting when feature not found in `activated_features` (rust-lang/cargo#14647) --- This also adds three license exceptions to Cargo. * arrayref — BSD-2-Clause * blake3 — CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception * constant_time_eq — CC0-1.0 OR MIT-0 OR Apache-2.0 These exceptions were added to rustc in rust-lang/rust#126930, so should be fine for Cargo as well.
2024-10-08Fix quotation marks around debug line in `src/ci/run.sh`Josh Stone-1/+1
Without this change, the markdown-style backticks are treated as a shell command substitution, which fails like so: /checkout/src/ci/run.sh: line 58: DISABLE_CI_RUSTC_IF_INCOMPATIBLE: command not found debug: configured.
2024-10-08compiler: Seal off the rustc_target::abi enum glob importsJubilee Young-3/+8
2024-10-08cg_gcc: Factor out rustc_target::abiJubilee Young-8/+12
2024-10-08cg_clif: Factor out rustc_target::abiJubilee Young-1/+3
2024-10-08compiler: Factor rustc_target::abi out of cg_llvmJubilee Young-7/+14
2024-10-08compiler: Factor rustc_target::abi out of cg_ssaJubilee Young-5/+7
2024-10-08compiler: Factor rustc_target::abi out of hir_typeckJubilee Young-1/+3
2024-10-08compiler: Factor rustc_target::abi out of const_evalJubilee Young-7/+9
2024-10-08compiler: Factor rustc_target::abi::* out of ty_utilsJubilee Young-8/+17
2024-10-08compiler: Factor rustc_target::abi::* out of middle::ty::layoutJubilee Young-7/+18
2024-10-08Reserve guarded string literals (RFC 3593)Peter Jaszkowiak-9/+1514
2024-10-08Update cargoWeihang Lo-0/+3
This also adds three license exceptions to Cargo. * arrayref — BSD-2-Clause * blake3 — CC0-1.0 OR Apache-2.0 OR Apache-2.0 WITH LLVM-exception * constant_time_eq — CC0-1.0 OR MIT-0 OR Apache-2.0 These exceptions were added to rustc in rust-lang/rust#126930, so should be fine for Cargo as well.
2024-10-08Auto merge of #131155 - jieyouxu:always-kill, r=onur-ozkanbors-6/+113
Prevent building cargo from invalidating build cache of other tools due to conditionally applied `-Zon-broken-pipe=kill` via tracked `RUSTFLAGS` This PR fixes #130980 where building cargo invalidated the tool build caches of other tools (such as rustdoc) because `-Zon-broken-pipe=kill` was conditionally passed via `RUSTFLAGS` for other tools *except* for cargo. The differing `RUSTFLAGS` triggered tool build cache invalidation as `RUSTFLAGS` is a tracked env var -- any changes in `RUSTFLAGS` requires a rebuild. `-Zon-broken-pipe=kill` is load-bearing for rustc and rustdoc to not ICE on broken pipes due to usages of raw std `println!` that panics without the flag being set, which manifests in ICEs. I can't say I like the changes here, but it is what it is... See detailed discussions and history of `-Zon-broken-pipe=kill` usage in https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Internal.20lint.20for.20raw.20.60print!.60.20and.20.60println!.60.3F/near/474593815. ## Approach This PR fixes the tool build cache invalidation by informing the `rustc` binary shim when to apply `-Zon-broken-pipe=kill` (i.e. when the rustc binary shim is not used to build cargo). This information is not communicated by `RUSTFLAGS`, which is an env var tracked by cargo, and instead uses an untracked env var `UNTRACKED_BROKEN_PIPE_FLAG` so we won't trigger tool build cache invalidation. We preserve bootstrap's behavior of not setting that flag for cargo by conditionally omitting setting `UNTRACKED_BROKEN_PIPE_FLAG` when building cargo. Notably, the `-Zon-broken-pipe=kill` instance in https://github.com/rust-lang/rust/blob/1e5719bdc40bb553089ce83525f07dfe0b2e71e9/src/bootstrap/src/core/build_steps/compile.rs#L1058 is not modified because that is used to build rustc only and not cargo itself. Thanks to `@cuviper` for the idea! ## Testing ### Integration testing This PR introduces a run-make test for rustc and rustdoc that checks that when they do not ICE/panic when they encounter a broken pipe of the stdout stream. I checked this test will catch the broken pipe ICE regression for rustc on Linux (at least) by commenting out https://github.com/rust-lang/rust/blob/1e5719bdc40bb553089ce83525f07dfe0b2e71e9/src/bootstrap/src/core/build_steps/compile.rs#L1058, and the test failed because rustc ICE'd. ### Manual testing I have manually tried: 1. `./x clean && `./x test build --stage 1` -> `rustc +stage1 --print=sysroot | false`: no ICE. 2. `./x clean` -> `./x test run-make` twice: no stage 1 cargo rebuilds. 3. `./x clean` -> `./x build rustdoc` -> `rustdoc +stage1 --version | false`: no panics. 4. `./x test src/tools/cargo`: tests pass, notably `build::close_output` and `cargo_command::closed_output_ok` do not fail which would fail if cargo was built with `-Zon-broken-pipe=kill`. ## Related discussions Thanks to everyone who helped! - https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/Applying.20.60-Zon-broken-pipe.3Dkill.60.20flags.20in.20bootstrap.3F - https://rust-lang.zulipchat.com/#narrow/stream/326414-t-infra.2Fbootstrap/topic/Modifying.20run-make.20tests.20unnecessarily.20rebuild.20stage.201.20.2E.2E.2E - https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Internal.20lint.20for.20raw.20.60print!.60.20and.20.60println!.60.3F Fixes https://github.com/rust-lang/rust/issues/130980 Closes https://github.com/rust-lang/rust/issues/131059 --- try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-mingw
2024-10-08Dont ICE when encountering post-mono layout cycle errorMichael Goulet-5/+129