about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2025-02-06Avoid manually producing FatalError in a couple of placesbjorn3-3/+3
2025-02-06Construct DiagCtxt a bit earlier in build_sessionbjorn3-14/+6
2025-02-06Auto merge of #136585 - gvozdvmozgu:memchr-eat-until-lexer, r=lcnrbors-2/+11
implement `eat_until` leveraging memchr in lexer
2025-02-06Auto merge of #136471 - safinaskar:parallel, r=SparrowLiibors-395/+405
tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc` tree-wide: parallel: Fully removed all `Lrc`, replaced with `Arc` This is continuation of https://github.com/rust-lang/rust/pull/132282 . I'm pretty sure I did everything right. In particular, I searched all occurrences of `Lrc` in submodules and made sure that they don't need replacement. There are other possibilities, through. We can define `enum Lrc<T> { Rc(Rc<T>), Arc(Arc<T>) }`. Or we can make `Lrc` a union and on every clone we can read from special thread-local variable. Or we can add a generic parameter to `Lrc` and, yes, this parameter will be everywhere across all codebase. So, if you think we should take some alternative approach, then don't merge this PR. But if it is decided to stick with `Arc`, then, please, merge. cc "Parallel Rustc Front-end" ( https://github.com/rust-lang/rust/issues/113349 ) r? SparrowLii `@rustbot` label WG-compiler-parallel
2025-02-06Auto merge of #136613 - workingjubilee:rollup-ry6rw0m, r=workingjubileebors-594/+613
Rollup of 13 pull requests Successful merges: - #133932 (Avoid using make_direct_deprecated() in extern "ptx-kernel") - #136269 (Pass spans around new solver) - #136550 (Fix `rustc_hidden_type_of_opaques` for RPITITs with no default body) - #136558 (Document minimum supported host tooling on macOS) - #136563 (Clean up `Trivial*Impls` macros) - #136566 (Fix link in from_fn.rs) - #136573 (Document why some "type mismatches" exist) - #136583 (Only highlight unmatchable parameters at the definition site) - #136587 (Update browser-ui-test version to `0.20.2`) - #136590 (Implement RustcInternal for RawPtrKind) - #136591 (Add `rustc_hir_pretty::expr_to_string` function) - #136595 (Fix `unreachable_pub` lint for hermit target) - #136611 (cg_llvm: Remove the `mod llvm_` hack, which should no longer be necessary) Failed merges: - #136565 (compiler: Clean up weird `rustc_abi` reexports) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-05Rollup merge of #136611 - Zalathar:llvm-underscore, r=workingjubileeJubilee-12/+3
cg_llvm: Remove the `mod llvm_` hack, which should no longer be necessary This re-export was introduced in https://github.com/rust-lang/rust/commit/c76fc3d804600bc4f19382576aa53269a1ec095b, as a workaround for #53912. In short, there was/is an assumption in some LLVM LTO code that symbol names would not contain `.llvm.`, but legacy symbol mangling would naturally produce that sequence for symbols in a module named `llvm`. This was later “fixed” by adding a special case to the legacy symbol mangler in #61195, which detects the sequence `llvm` and emits the `m` in an escaped form. As a result, there should no longer be any need to avoid the module name `llvm` in the compiler itself. (Symbol mangling v0 avoids this problem by not using `.` in the first place, outside of the “vendor-specific suffix”.)
2025-02-05Rollup merge of #136595 - thaliaarchi:hermit-unreachable-pub, r=NoratriebJubilee-2/+2
Fix `unreachable_pub` lint for hermit target The build for the hermit target (`#[cfg(target_os = "hermit")]`) fails on master as of [8df89d1cb07](https://github.com/rust-lang/rust/commit/8df89d1cb077cd76013d3f9f5a4e92c5b5a9280c) (2025-02-05), due to introducing `#[warn(unreachable_pub)]` at the root in https://github.com/rust-lang/rust/pull/134286 (Enable unreachable_pub lint in core, merged 2025-01-20). Make the relevant visibility modifiers more specific to resolve the warning. ``` $ ./x build --target x86_64-unknown-hermit Building bootstrap Finished `dev` profile [unoptimized] target(s) in 0.34s Building stage0 library artifacts (x86_64-apple-darwin) Finished `release` profile [optimized] target(s) in 0.15s Building compiler artifacts (stage0 -> stage1, x86_64-apple-darwin) Finished `release` profile [optimized] target(s) in 1.67s Creating a sysroot for stage1 compiler (use `rustup toolchain link 'name' build/host/stage1`) Building stage1 library artifacts {alloc, core, panic_abort, panic_unwind, proc_macro, std, sysroot, test, unwind} (x86_64-apple-darwin -> x86_64-unknown-hermit) Compiling panic_unwind v0.0.0 (library/panic_unwind) error: unreachable `pub` item --> library/panic_unwind/src/hermit.rs:10:9 | 10 | pub fn __rust_abort() -> !; | ---^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates = note: `-D unreachable-pub` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unreachable_pub)]` error: unreachable `pub` item --> library/panic_unwind/src/hermit.rs:17:9 | 17 | pub fn __rust_abort() -> !; | ---^^^^^^^^^^^^^^^^^^^^^^^^ | | | help: consider restricting its visibility: `pub(crate)` | = help: or consider exporting it for use by other crates error: could not compile `panic_unwind` (lib) due to 2 previous errors Build completed unsuccessfully in 0:00:39 ```
2025-02-05Rollup merge of #136591 - GuillaumeGomez:expr-to-string, r=UrgauJubilee-0/+4
Add `rustc_hir_pretty::expr_to_string` function It'll allow me to work on a new rustdoc feature. :) r? `@Urgau`
2025-02-05Rollup merge of #136590 - carolynzech:raw-ptr-kind-internal, r=compiler-errorsJubilee-1/+13
Implement RustcInternal for RawPtrKind Implement `RustcInternal` for `RawPtrKind`. https://github.com/rust-lang/rust/pull/135748 introduced a `Stable` implementation [here](https://github.com/rust-lang/rust/pull/135748/files#diff-60f5e8edf69e04e89ef0c7f576363a91fa141e1db969484cef00063ed39c62e4R235).
2025-02-05Rollup merge of #136587 - GuillaumeGomez:update-gui-tests, r=notriddleJubilee-2/+1
Update browser-ui-test version to `0.20.2` r? `@notriddle`
2025-02-05Rollup merge of #136583 - Jarcho:fn_ctxt2, r=compiler-errorsJubilee-312/+246
Only highlight unmatchable parameters at the definition site Followup to #136497 This generally results more focused messages in the same vein as #99635 (see `test/ui/argument-suggestions/complex.rs`). There are still some cases (e.g. `test/ui/argument-suggestions/permuted_arguments.rs`) where it might be worth highlighting the arguments. This is mitigated by the fact that a suggestion with a suggested rearrangement is given. r? `@compiler-errors`
2025-02-05Rollup merge of #136573 - oli-obk:document-literal-at-wrong-type-reason, ↵Jubilee-0/+3
r=compiler-errors Document why some "type mismatches" exist Just something I stumbled over and thought to save myself (and maybe others) the research time when encountering it again.
2025-02-05Rollup merge of #136566 - hkBst:patch-1, r=scottmcmJubilee-1/+1
Fix link in from_fn.rs
2025-02-05Rollup merge of #136563 - nnethercote:clean-up-Trivials, r=lcnrJubilee-164/+123
Clean up `Trivial*Impls` macros They're currently quite messy. Details in the individual commit logs. r? `@lcnr`
2025-02-05Rollup merge of #136558 - madsmtm:apple-host-tooling, r=jieyouxuJubilee-0/+12
Document minimum supported host tooling on macOS In particular we support macOS 10.12 (same as for binaries produced by `rustc`) and Xcode 9.2 (the highest Xcode version that runs on macOS 10.12.6). I have this installed on a MacBook Pro from 2013 that sits below my desk, and am occasionally testing it. I am documenting this now because it was unclear in https://github.com/rust-lang/rust/issues/136523. (I'm not inherently against bumping these one day, but that's a separate discussion, let's at least document what we support right now). `@rustbot` label O-macos
2025-02-05Rollup merge of #136550 - compiler-errors:rpitit-empty-body, r=oli-obkJubilee-0/+32
Fix `rustc_hidden_type_of_opaques` for RPITITs with no default body Needed this when debugging something
2025-02-05Rollup merge of #136269 - compiler-errors:spanned, r=lcnrJubilee-61/+139
Pass spans around new solver ...so that when we instantiate canonical responses, we can actually have region obligations with the right span. Within the solver itself, we still use dummy spans everywhere.
2025-02-05Rollup merge of #133932 - bjorn3:fix_ptx_kernel_abi, r=wesleywiserJubilee-39/+34
Avoid using make_direct_deprecated() in extern "ptx-kernel" This method will be removed in the future as it produces a broken ABI that depends on cg_llvm implementation details. After this PR wasm32-unknown-unknown is the only remaining user of make_direct_deprecated(). Fixes https://github.com/rust-lang/rust/issues/117271 Blocks https://github.com/rust-lang/rust/issues/38788
2025-02-06Auto merge of #136409 - TDecking:mul_hi, r=Mark-Simulacrumbors-20/+1
Use `widening_mul` instead of a separate function A helper function became obsolete after `widening_mul` became available for `u128` values.
2025-02-06Fix whitespace in lift macros.Nicholas Nethercote-22/+32
This has been bugging me for some time.
2025-02-06Clean up trivial traversal/lift impl generator macro calls.Nicholas Nethercote-151/+100
We have four macros for generating trivial traversal (fold/visit) and lift impls. - `rustc_ir::TrivialTypeTraversalImpls` - `rustc_middle::TrivialTypeTraversalImpls` - `rustc_middle::TrivialLiftImpls` - `rustc_middle::TrivialTypeTraversalAndLiftImpls` The first two are very similar. The last one just combines the second and third one. The macros themselves are ok, but their use is a mess. This commit does the following. - Removes types that no longer need a lift and/or traversal impl from the macro calls. - Consolidates the macro calls into the smallest number of calls possible, with each one mentioning as many types as possible. - Orders the types within those macro calls alphabetically, and makes the module qualification more consistent. - Eliminates `rustc_middle::mir::type_foldable`, because the macro calls were merged and the manual `TypeFoldable` impls are better placed in `structural_impls.rs`, alongside all the other ones. This makes the code more concise. Moving forward, it also makes it more obvious where new types should be added.
2025-02-06Remove some unused glob re-exportsZalathar-4/+0
These were detected by temporarily making `mod llvm` non-public.
2025-02-06Remove the `mod llvm_` hack, which should no longer be necessaryZalathar-8/+3
2025-02-06Auto merge of #136265 - notriddle:notriddle/clean-up, r=fmeasebors-17/+15
rustdoc: use ThinVec for generic arg parts This reduces the size of both these args, and of path segments, so should measurably help with memory use.
2025-02-05Auto merge of #136572 - jieyouxu:rollup-mtyaisw, r=jieyouxubors-1785/+2359
Rollup of 12 pull requests Successful merges: - #132547 (cg_gcc: Directly use rustc_abi instead of reexports) - #135572 (tests: Port `split-debuginfo` to rmake.rs) - #135964 (Make cenum_impl_drop_cast a hard error) - #136154 (Use +secure-plt for powerpc-unknown-linux-gnu{,spe}) - #136304 (Reject negative literals for unsigned or char types in pattern ranges and literals) - #136418 (uefi: process: Add support for command environment variables) - #136449 (std: move network code into `sys`) - #136517 (implement inherent str constructors) - #136536 (Rename and Move some UI tests to more suitable subdirs) - #136537 (Update `compiler-builtins` to 0.1.145) - #136555 (Rename `slice::take...` methods to `split_off...`) - #136567 (Arbitrary self types v2: recursion test) r? `@ghost` `@rustbot` modify labels: rollup
2025-02-05Pass spans around new solverMichael Goulet-55/+137
2025-02-05Auto merge of #136253 - notriddle:notriddle/aot-minify, r=GuillaumeGomezbors-32/+35
rustdoc: run css and html minifier at build instead of runtime This way, adding a bunch of comments to the JS files won't make rustdoc slower. Meant to address https://github.com/rust-lang/rust/pull/136161#issuecomment-2622069453
2025-02-05Remove span from delegateMichael Goulet-6/+2
2025-02-05Add `rustc_hir_pretty::expr_to_string` functionGuillaume Gomez-0/+4
2025-02-05Implement RustcInternal for RawPtrKindCarolyn Zech-1/+13
2025-02-05Update browser-ui-test version to `0.20.2`Guillaume Gomez-2/+1
2025-02-05When displaying a parameter mismatch error, only highlight the mismatched ↵Jason Newcomb-312/+246
parameters when showing the definition.
2025-02-05Auto merge of #136302 - oli-obk:push-vvqmwzunxsrk, r=compiler-errorsbors-21/+28
Avoid calling the layout_of query in lit_to_const We got all the information available locally
2025-02-05implement `eat_until` leveraging memchr in lexergvozdvmozgu-2/+11
2025-02-05Rollup merge of #136567 - adetaylor:test-for-recursion, r=oli-obk许杰友 Jieyou Xu (Joe)-0/+71
Arbitrary self types v2: recursion test Add a test for infinite recursion of an arbitrary self type. These diagnostics aren't perfect (especially the repetition of the statement that there's too much recursion) but for now at least let's add a test to confirm that such diagnostics are emitted. As suggested by ```@oli-obk``` Relates to #44874 r? ```@wesleywiser```
2025-02-05Rollup merge of #136555 - cramertj:split_off, r=dtolnay许杰友 Jieyou Xu (Joe)-95/+134
Rename `slice::take...` methods to `split_off...` This rename was discussed and recommended in a recent t-libs meeting. cc https://github.com/rust-lang/rust/issues/62280 There's an additional commit here which modifies internals of unstable `OneSidedRange` APIs in order to implement `split_off` methods in a panic-free way (remove `unreachable!()`) as recommended in https://github.com/rust-lang/rust/pull/88502/files#r760177240. I can split this out into a separate PR if needed.
2025-02-05Rollup merge of #136537 - tgross35:update-builtins, r=tgross35许杰友 Jieyou Xu (Joe)-6/+6
Update `compiler-builtins` to 0.1.145 This includes https://github.com/rust-lang/compiler-builtins/pull/752 which is required for LLVM 20.
2025-02-05Rollup merge of #136536 - DuskyElf:master, r=jieyouxu许杰友 Jieyou Xu (Joe)-36/+21
Rename and Move some UI tests to more suitable subdirs ## Affected Tests - tests/ui/issues/issue-48838.rs -> tests/ui/enum/closure-in-enum-issue-48838.rs https://github.com/rust-lang/rust/issues/48838 - tests/ui/issues/issue-40350.rs -> tests/ui/enum/enum-inside-enum-issue-40350.rs https://github.com/rust-lang/rust/issues/40350 - tests/ui/issues/issue-41272.rs -> tests/ui/expr/if/if-let-no-match-guards-issue-41272.rs https://github.com/rust-lang/rust/issues/41272 - tests/ui/issues/issue-40408.rs -> tests/ui/lexer/floating-point-0e10-issue-40408.rs https://github.com/rust-lang/rust/issues/40408 - tests/ui/issues/issue-40136.rs -> tests/ui/macros/const-expr-invocations-issue-40136.rs https://github.com/rust-lang/rust/issues/40136 - tests/ui/issues/issue-40845.rs -> tests/ui/macros/macros-in-trait-positions-issue-40845.rs https://github.com/rust-lang/rust/issues/40845 - tests/ui/issues/issue-41213.rs -> tests/ui/match/enum-and-break-in-match-issue-41213.rs https://github.com/rust-lang/rust/issues/41213 - tests/ui/issues/issue-40782.rs -> tests/ui/suggestions/for-loop-missing-in.rs https://github.com/rust-lang/rust/issues/40782 - tests/ui/issues/issue-40827.rs -> tests/ui/trait-bounds/deep-level-Send-bound-check-issue-40827.rs https://github.com/rust-lang/rust/issues/40827 - tests/ui/issues/issue-40610.rs -> tests/ui/typeck/coercion-check-for-addition-issue-40610.rs https://github.com/rust-lang/rust/issues/40610 - tests/ui/issues/issue-40883.rs -> tests/ui/codegen/StackColoring-not-blowup-stack-issue-40883.rs https://github.com/rust-lang/rust/issues/40883 - tests/ui/issues/issue-40861.rs -> tests/ui/typeck/coercion-check-for-indexing-expression-issue-40861.rs https://github.com/rust-lang/rust/issues/40861 - tests/ui/issues/issue-41139.rs -> tests/ui/typeck/unsized-rvalue-issue-41139.rs https://github.com/rust-lang/rust/issues/41139 - tests/ui/issues/issue-40749.rs -> tests/ui/wf/range-expr-root-of-constant-issue-40749.rs https://github.com/rust-lang/rust/issues/40749 - tests/ui/issues/issue-40235.rs -> tests/ui/while/while-let-scope-issue-40235.rs https://github.com/rust-lang/rust/issues/40235
2025-02-05Rollup merge of #136517 - m4rch3n1ng:inherent-str-constructors, r=jhpratt许杰友 Jieyou Xu (Joe)-22/+180
implement inherent str constructors implement #131114 this implements - str::from_utf8 - str::from_utf8_mut - str::from_utf8_unchecked - str::from_utf8_unchecked_mut i left `std::str::from_raw_parts` and `std::str::from_raw_parts_mut` out of this as those are unstable and were not mentioned by the tracking issue or the original pull request, but i can add those here as well. i was also unsure of what to do with the `rustc_const_(un)stable` attributes: i removed the `#[rustc_const_stable]` attribute from `str::from_utf8`, `str::from_utf8_unchecked` and `str::from_utf8_unchecked_mut`, and left the`#[rust_const_unstable]` in `str::from_utf8_mut` (btw why is that one not const stable yet with #57349 merged?). is there a way to redirect users to the stable `std::str::from_utf8` instead of only saying "hey this is unstable"? for now i just removed the check for `str::from_utf8` in the test in `tests/ui/suggestions/suggest-std-when-using-type.rs`.
2025-02-05Rollup merge of #136449 - joboet:move_pal_net, r=ChrisDenton许杰友 Jieyou Xu (Joe)-1037/+114
std: move network code into `sys` As per #117276, this PR moves `sys_common::net` and the `sys::pal::net` into the newly created `sys::net` module. In order to support #135141, I've moved all the current network code into a separate `connection` module, future functions like `hostname` can live in separate modules. I'll probably do a follow-up PR and clean up some of the actual code, this is mostly just a reorganization.
2025-02-05Rollup merge of #136418 - Ayush1325:command-env, r=jhpratt许杰友 Jieyou Xu (Joe)-3/+62
uefi: process: Add support for command environment variables Set environment variables before launching the process and restore the prior variables after the program exists. This is the same implementation as the one used by UEFI Shell Execute [0]. [0]: https://github.com/tianocore/edk2/blob/2d2642f4832ebc45cb7d5ba9430b933d953b94f2/ShellPkg/Application/Shell/ShellProtocol.c#L1700
2025-02-05Rollup merge of #136304 - oli-obk:push-ymxoklvzrpvx, r=Nadrieril许杰友 Jieyou Xu (Joe)-2/+75
Reject negative literals for unsigned or char types in pattern ranges and literals It sucks a bit that we have to duplicate the work here (normal expressions just get this for free from the `ExprKind::UnOp(UnOp::Neg, ...)` typeck logic. In https://github.com/rust-lang/rust/pull/134228 I caused ```rust fn main() { match 42_u8 { -10..255 => {}, _ => {} } } ``` to just compile without even a lint. I can't believe we didn't have tests for this Amusingly https://github.com/rust-lang/rust/pull/136302 will also register a delayed bug in `lit_to_const` for this, so we'll have a redundancy if something like this fails again.
2025-02-05Rollup merge of #136154 - taiki-e:ppc-secure-plt, r=nikic许杰友 Jieyou Xu (Joe)-1/+7
Use +secure-plt for powerpc-unknown-linux-gnu{,spe} Fixes #136131 See that issue for details. I'm not sure about the policy about baseline on these platforms (there is no [platform support doc](https://doc.rust-lang.org/nightly/rustc/platform-support.html) for them), but it seems that the Debian/Ubuntu's cross-compiler (powerpc-linux-gnu-gcc) already uses --enable-secureplt at least as of Debian 9 (stretch) and Ubuntu 14.04. ``` $ cat /etc/os-release | grep VERSION_ID VERSION_ID="9" $ powerpc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=powerpc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/powerpc-linux-gnu/6/lto-wrapper Target: powerpc-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-powerpc-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-powerpc-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-powerpc-cross --with-arch-directory=ppc --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc=auto --enable-secureplt --disable-softfloat --with-cpu=default32 --disable-softfloat --enable-targets=powerpc-linux,powerpc64-linux --enable-multiarch --with-long-double-128 --enable-multilib --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=powerpc-linux-gnu --program-prefix=powerpc-linux-gnu- --includedir=/usr/powerpc-linux-gnu/include Thread model: posix gcc version 6.3.0 20170516 (Debian 6.3.0-18) ``` ``` $ cat /etc/os-release | grep VERSION_ID VERSION_ID="14.04" $ cat /etc/debian_version jessie/sid $ powerpc-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=powerpc-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/powerpc-linux-gnu/4.8/lto-wrapper Target: powerpc-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.4-2ubuntu1~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/powerpc-linux-gnu/include/c++/4.8.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-powerpc-cross/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-powerpc-cross --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-powerpc-cross --with-arch-directory=ppc --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libgcj --enable-objc-gc --enable-secureplt --disable-softfloat --with-cpu=default32 --disable-softfloat --enable-targets=powerpc-linux,powerpc64-linux --enable-multiarch --disable-werror --with-long-double-128 --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=powerpc-linux-gnu --program-prefix=powerpc-linux-gnu- --includedir=/usr/powerpc-linux-gnu/include Thread model: posix gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1) ``` cc ```@glaubitz``` (who added powerpc-unknown-linux-gnuspe in https://github.com/rust-lang/rust/pull/48484) r? tgross35 ```@rustbot``` label +O-PowerPC +O-linux-gnu try-job: dist-powerpc-linux try-job: dist-powerpc64-linux try-job: dist-powerpc64le-linux try-job: dist-various-1 try-job: dist-various-2 try-job: aarch64-gnu
2025-02-05Rollup merge of #135964 - ehuss:cenum_impl_drop_cast, r=Nadrieril许杰友 Jieyou Xu (Joe)-181/+12
Make cenum_impl_drop_cast a hard error This changes the `cenum_impl_drop_cast` lint to be a hard error. This lint has been deny-by-default and warning in dependencies since https://github.com/rust-lang/rust/pull/97652 about 2.5 years ago. Closes https://github.com/rust-lang/rust/issues/73333
2025-02-05Rollup merge of #135572 - jieyouxu:migrate-split-debuginfo, r=davidtwco许杰友 Jieyou Xu (Joe)-377/+1652
tests: Port `split-debuginfo` to rmake.rs Part of #121876. This PR supersedes #128754 and is co-authored with `@Oneirical.` ## Known limitations - In general, like the `Makefile` version, this test in its present form is also somewhat funny because for the most part it merely checks for existence/absence of output artifacts but makes no attempt to actually check if the debuginfo is at all usable. ## Changes This PR ports `tests/run-make/split-debuginfo` to rmake.rs. This is an **initial** port, and certainly could be cleaned up and/or enhanced. The original Makefile version had several functional problems. I fixed some of them, but also left some existing issues as-is. 1. The linux/non-linux final branch had a conditional interpolation of `UNSTABLE_OPTIONS := -Zunstable-options`. However, one of the use sites was `-C $(UNSTABLE_OPTIONS) split-debuginfo`. This indicates to me that this run-make test is not run in CI under a non-linux + non-windows + non-darwin environment, because that would've failed as this would expand to `-C -Zunstable-options split-debuginfo`. I fixed this in the rmake.rs version, but I'm not sure if this distinction is worth keeping at all if it's not tested in CI. 2. There are several comments that were discovered to be wrong. I tried to fix them in the rmake.rs version as well. 3. The check for path remapping / lack of path remapping through ```make objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1 ``` is incorrect, because that looks at the single line of that contains `DW_AT_GNU_dwo_name`. This is unfortunately wrong because empirical evidence shows that with `objdump`[^objdump], the check actually needs to look at the attribute value of `DW_AT_comp_dir` on the previous line not `DW_AT_GNU_dwo_name`[^gnu-ext]. Example output of `objdump`: ```text <10> DW_AT_comp_dir : (indirect string, offset: 0xafb48): /home/joe/repos/rust <14> DW_AT_GNU_dwo_name: (indirect string, offset: 0x5d1b0): foo.foo.fc848df41df7a00d-cgu.0.rcgu.dwo ``` In the rmake.rs version I used a 2-line sliding window to check for `DW_AT_comp_dir` and `DW_AT_GNU_dwo_name`, but to look at `DW_AT_comp_dir` specifically. 4. I included a bunch of FIXMEs and ENHANCEMENTs I noticed regarding the test because I didn't want to fix them in this initial port[^enhancement]. 5. The Makefile version didn't test *anything* on Windows (both windows-msvc and windows-gnu). I added some *very* basic and *very* sparse checks for windows-msvc, but I am not willing to spend the effort to expand test coverage to windows-gnu in this initial port. 6. This run-make test is way too big. But I didn't want to expend the effort of breaking this up in this initial port. [^objdump]: the output format differs between `objdump` and `llvm-objdump`, but the same is true for `llvm-objdump` that this is looking at the wrong line. [^gnu-ext]: AFAICT that is a GNU DWARF attribute extension, since it isn't mentioned in DWARFv5 spec [^enhancement]: For instance, the previous path remapping check could in theory be precisely inspected by inspecting `.debug_info` section to look for attribute value of `DW_AT_comp_dir`. But that involves resolving the value of the indirect string, which means you have to: (1) look for offset into string offset table and (2) use *that* offset to find the string itself in the string table. The split part of "split-debuginfo" makes this murky for me, so I wasn't able to replace `llvm-objdump` textual output substring matches with more precise `object` + `gimli` inspections. ## Review advice - I'm sorry for how long the rmake.rs test ended up, but a lot of it is comments and just vertical space due to formatting. If there's any ways to make this test less long / convoluted, advice would be appreciated. - This PR *intentionally* introduces several intermediate commits for the `Makefile`, mostly to illustrate the problems I discovered when looking at the original `Makefile` version. This is intended to highlight the existing problems in the `Makefile` version for the reviewer[^squash]. - There are several intentional non-functional commits: 1. Reindent the `Makefile` to make the platform conditional gating more obvious. 2. Collapse nested if-else branches into an else if construct, which is not supported by GNU Make 3.80. 3. Remove all redundant `-C debuginfo=2` when `-g` is already specified. - This PR is best reviewed commit-by-commit. [^squash]: I intend to squash these intermediate commits away after the reviewer concludes that the current form of the rmake.rs test is acceptable for merge. Before then, I'll keep them to help with review. --- try-job: x86_64-msvc try-job: i686-msvc try-job: i686-mingw try-job: x86_64-mingw-1 try-job: x86_64-apple-1 try-job: aarch64-apple try-job: test-various
2025-02-05Rollup merge of #132547 - workingjubilee:rustc-abi-in-cg-gcc, r=GuillaumeGomez许杰友 Jieyou Xu (Joe)-25/+25
cg_gcc: Directly use rustc_abi instead of reexports These reexports will be going away soonish.
2025-02-05Document why some "type mismatches" existOli Scherer-0/+3
2025-02-05Auto merge of #136094 - davidv1992:upgrade-elsa, r=oli-obkbors-3/+3
Upgrade elsa to the newest version. This was locked to 1.7.1 because of an error in the elsa release process that has since been fixed. Upgrading has the advantage that the elsa code runs properly in miri, at least with tree borrows. This was spawned from https://github.com/rust-lang/rust/issues/135870#issuecomment-2612470540
2025-02-05Only allow negation on literals in patterns if it's on integers or floatsOli Scherer-4/+38
2025-02-05Add regression test for negative unsigned literals in patternsOli Scherer-0/+39