about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-11-09Add test for str for "expected primitive, found type"Zachary S-3/+28
2024-11-09Add str to "expected primitive, found type" diagnosticZachary S-0/+1
2024-11-08Auto merge of #132764 - MikaelUrankar:freebsd_armv7, r=workingjubileebors-2/+0
Drop "gnu" in the target env for FreeBSD armv6/7 FreeBSD is not a GNU system
2024-11-08Auto merge of #132746 - flip1995:clippy-subtree-update, r=Manishearthbors-900/+5023
Clippy subtree update r? `@Manishearth`
2024-11-08Auto merge of #132717 - RalfJung:rustc_safe_intrinsic, r=compiler-errorsbors-348/+380
remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic functions instead This brings us one step closer towards removing support for `extern "rust-intrinsic"` blocks, in favor of `#[rustc_intrinsic]` functions. Also move `#[rustc_intrinsic]` under the `intrinsics` feature gate, to match the `extern "rust-intrinsic"` style.
2024-11-08Clippy: cfg out validate_diag on release buildsPhilipp Krones-3/+4
2024-11-08Drop "gnu" in the target env for FreeBSD armv6/7Mikael Urankar-2/+0
FreeBSD is not a GNU system
2024-11-08remove support for rustc_safe_intrinsic attribute; use rustc_intrinsic ↵Ralf Jung-348/+380
functions instead
2024-11-08Auto merge of #132762 - Zalathar:rollup-qfgz165, r=Zalatharbors-338/+695
Rollup of 5 pull requests Successful merges: - #132161 ([StableMIR] A few fixes to pretty printing) - #132389 (coverage: Simplify parts of coverage graph creation) - #132452 (coverage: Extract safe FFI wrapper functions to `llvm_cov`) - #132590 (Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats`) - #132738 (Initialize channel `Block`s directly on the heap) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-08Rollup merge of #132738 - cuviper:channel-heap-init, r=ibraheemdevStuart Cook-4/+33
Initialize channel `Block`s directly on the heap The channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. Fixes #102246 try-job: test-various
2024-11-08Rollup merge of #132590 - Zalathar:z-timings-stats, r=jieyouxuStuart Cook-47/+18
Simplify FFI calls for `-Ztime-llvm-passes` and `-Zprint-codegen-stats` The existing code for these unstable LLVM-infodump flags was jumping through hoops to pass an allocated C string across the FFI boundary, when it's much simpler to just write to a `&RustString` instead.
2024-11-08Rollup merge of #132452 - Zalathar:llvm-cov-wrappers, r=jieyouxuStuart Cook-164/+170
coverage: Extract safe FFI wrapper functions to `llvm_cov` This PR takes all of the inline `unsafe` calls in coverage codegen, and all the safe wrapper functions in `coverageinfo/mod.rs`, and moves them to a new `llvm_cov` submodule that is dedicated to safe FFI wrapper functions. This reduces the mixing of abstraction levels in the rest of coverage codegen. As a follow-up, this PR also tidies up the names and signatures of several of the coverage FFI functions.
2024-11-08Rollup merge of #132389 - Zalathar:graph-tweaks, r=jieyouxuStuart Cook-98/+79
coverage: Simplify parts of coverage graph creation This is a combination of three semi-related simplifications to how coverage graphs are created, grouped into one PR to avoid conflicts. There are no observable changes to the output of any of the coverage tests.
2024-11-08Rollup merge of #132161 - celinval:smir-fix-indent, r=compiler-errorsStuart Cook-25/+395
[StableMIR] A few fixes to pretty printing Improve identation, and a few other rvalue printing try-job: x86_64-msvc try-job: test-various
2024-11-08Auto merge of #132756 - workingjubilee:rollup-bed2akn, r=workingjubileebors-141/+569
Rollup of 10 pull requests Successful merges: - #130586 (Set "symbol name" in raw-dylib import libraries to the decorated name) - #131913 (Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support) - #132095 (Fix #131977 parens mangled in shared mut static lint suggestion) - #132131 ([StableMIR] API to retrieve definitions from crates) - #132639 (core: move intrinsics.rs into intrinsics folder) - #132696 (Compile `test_num_f128` conditionally on `reliable_f128_math` config) - #132737 (bootstrap: Print better message if lock pid isn't available) - #132739 (Fix `librustdoc/scrape_examples.rs` formatting) - #132740 (Update test for LLVM 20's new vector splat syntax) - #132741 (Update mips64 data layout to match LLVM 20 change) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-07Rollup merge of #132741 - zmodem:mips_data_layout, r=nikicJubilee-7/+12
Update mips64 data layout to match LLVM 20 change LLVM changed the data layout in https://github.com/llvm/llvm-project/pull/112084
2024-11-07Rollup merge of #132740 - zmodem:simd_syntax_update, r=durin42Jubilee-3/+3
Update test for LLVM 20's new vector splat syntax that was introduced in https://github.com/llvm/llvm-project/pull/112548
2024-11-07Rollup merge of #132739 - GuillaumeGomez:cleanup-scrape-code, r=notriddleJubilee-11/+22
Fix `librustdoc/scrape_examples.rs` formatting Still working on the intra-doc link feature. This time I encountered this file and it bothered me a bit so fixing formatting. :3 r? ````@notriddle````
2024-11-07Rollup merge of #132737 - clubby789:lock-no-pid, r=jieyouxuJubilee-2/+6
bootstrap: Print better message if lock pid isn't available Not actually sure why, but sometimes the PID isn't available so we print ``` WARNING: build directory locked by process , waiting for lock ``` This makes the message a bit nicer in this case
2024-11-07Rollup merge of #132696 - ↵Jubilee-2/+20
fortanix:raoul/rte-235-fix_fmodl_missing_symbol_issue, r=tgross35 Compile `test_num_f128` conditionally on `reliable_f128_math` config With #132434 merged, our internal SGX CI started failing with: ``` 05:27:34 = note: rust-lld: error: undefined symbol: fmodl 05:27:34 >>> referenced by arith.rs:617 (core/src/ops/arith.rs:617) 05:27:34 >>> /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/std-5d5f11eb008c9091.std.d8141acc61ab7ac8-cgu.10.rcgu.o:(std::num::test_num::h7dd9449f6c01fde8) 05:27:34 >>> did you mean: fmodf 05:27:34 >>> defined in: /home/jenkins/workspace/rust-sgx-ci/rust/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-fortanix-unknown-sgx/release/deps/libcompiler_builtins-0376f439a2ebf305.rlib(compiler_builtins-0376f439a2ebf305.compiler_builtins.c22db39d25d6f802-cgu.148.rcgu.o) ``` This originated from the `test_num_f128` test not having the required conditional compilation. This PR fixes that issue. cc: ````@jethrogb,```` ````@workingjubilee````
2024-11-07Rollup merge of #132639 - RalfJung:intrinsics, r=workingjubilee,AmanieuJubilee-6/+6
core: move intrinsics.rs into intrinsics folder This makes the rustbot notification we have set up for this folder in `triagebot.toml` actually work. Also IMO it makes more sense to have it all in one folder.
2024-11-07Rollup merge of #132131 - celinval:smir-crate-defs, r=compiler-errorsJubilee-4/+225
[StableMIR] API to retrieve definitions from crates Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, we're still missing items from trait implementation and primitives. r? ````@compiler-errors:```` Do you know what is the best way to retrieve the associated items for primitives and trait implementations for external crates? Thanks!
2024-11-07Rollup merge of #132095 - gechelberger:fix-131977, r=wesleywiserJubilee-8/+61
Fix #131977 parens mangled in shared mut static lint suggestion Resolves #131977 for static mut references after discussion with Esteban & Jieyou on [t-compiler/help](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/linting.20with.20parens.20in.20the.20HIR). This doesn't do anything to change the underlying issue if there are other expressions that generate lint suggestions which need to be applied within parentheses.
2024-11-07Rollup merge of #131913 - jieyouxu:only_debug_assertions, r=onur-ozkanJubilee-43/+119
Add `{ignore,needs}-{rustc,std}-debug-assertions` directive support Add `{ignore,needs}-{rustc,std}-debug-assertions` compiletest directives and retire the old `{ignore,only}-debug` directives. The old `{ignore,only}-debug` directives were ambiguous because you could have std built with debug assertions but rustc not built with debug assertions or vice versa. If we want to support the use case of controlling test run based on if rustc was built with debug assertions, then having `{ignore,only}-debug` will be very confusing. cc ````@matthiaskrgr```` Closes #123987. r? bootstrap (or compiler tbh)
2024-11-07Rollup merge of #130586 - dpaoliello:fixrawdylib, r=wesleywiserJubilee-55/+95
Set "symbol name" in raw-dylib import libraries to the decorated name `windows-rs` received a bug report that mixing raw-dylib generated and the Windows SDK import libraries was causing linker failures: <https://github.com/microsoft/windows-rs/issues/3285> The root cause turned out to be #124958, that is we are not including the decorated name in the import library and so the import name type is also not being correctly set. This change modifies the generation of import libraries to set the "symbol name" to the fully decorated name and correctly marks the import as being data vs function. Note that this also required some changes to how the symbol is named within Rust: for MSVC we now need to use the decorated name but for MinGW we still need to use partially decorated (or undecorated) name. Fixes #124958 Passing i686 MSVC and MinGW build: <https://github.com/rust-lang/rust/actions/runs/11000433888?pr=130586> r? `@ChrisDenton`
2024-11-07This test needs threadsJosh Stone-0/+1
2024-11-08Auto merge of #128849 - estebank:issue-89143, r=jackh726bors-102/+137
Tweak detection of multiple crate versions to be more encompassing Previously, we only emitted the additional context if the type was in the same crate as the trait that appeared multiple times in the dependency tree. Now, we look at all traits looking for two with the same name in different crates with the same crate number, and we are more flexible looking for the types involved. This will work even if the type that implements the wrong trait version is from a different crate entirely. ``` error[E0277]: the trait bound `CustomErrorHandler: ErrorHandler` is not satisfied because the trait comes from a different crate version --> src/main.rs:5:17 | 5 | cnb_runtime(CustomErrorHandler {}); | ^^^^^^^^^^^^^^^^^^^^^ the trait `ErrorHandler` is not implemented for `CustomErrorHandler` | note: there are multiple different versions of crate `c` in the dependency graph --> /home/gh-estebank/testcase-rustc-crate-version-mismatch/c-v0.2/src/lib.rs:1:1 | 1 | pub trait ErrorHandler {} | ^^^^^^^^^^^^^^^^^^^^^^ this is the required trait | ::: src/main.rs:1:5 | 1 | use b::CustomErrorHandler; | - one version of crate `c` is used here, as a dependency of crate `b` 2 | use c::cnb_runtime; | - one version of crate `c` is used here, as a direct dependency of the current crate | ::: /home/gh-estebank/testcase-rustc-crate-version-mismatch/b/src/lib.rs:1:1 | 1 | pub struct CustomErrorHandler {} | ----------------------------- this type doesn't implement the required trait | ::: /home/gh-estebank/testcase-rustc-crate-version-mismatch/c-v0.1/src/lib.rs:1:1 | 1 | pub trait ErrorHandler {} | ---------------------- this is the found trait = note: two types coming from two different versions of the same crate are different types even if they look the same = help: you can use `cargo tree` to explore your dependency tree ``` Fix #89143.
2024-11-07[StableMIR] A few fixes to pretty printingCelina G. Val-25/+395
Improve identation, and a few other rvalue printing
2024-11-07Update Cargo.lockPhilipp Krones-1/+0
2024-11-07Merge commit 'f712eb5cdccd121d0569af12f20e6a0fabe4364d' into ↵Philipp Krones-900/+5023
clippy-subtree-update
2024-11-07[StableMIR] API to retrieve definitions from cratesCelina G. Val-4/+225
Add functions to retrieve function definitions and static items from all crates (local and external). For external crates, add a query to retrieve the number of defs in a foreign crate.
2024-11-07Auto merge of #132472 - taiki-e:sparc-asm, r=Amanieubors-43/+770
Basic inline assembly support for SPARC and SPARC64 This implements asm_experimental_arch (tracking issue https://github.com/rust-lang/rust/issues/93335) for SPARC and SPARC64. This PR includes: - General-purpose registers `r[0-31]` (`reg` register class, LLVM/GCC constraint `r`) Supported types: i8, i16, i32, i64 (SPARC64-only) Aliases: `g[0-7]` (`r[0-7]`), `o[0-7]` (`r[8-15]`), `l[0-7]` (`r[16-23]`), `i[0-7]` (`r[24-31]`) - `y` register (clobber-only, needed for clobber_abi) - preserves_flags: Integer condition codes (`icc`, `xcc`) and floating-point condition codes (`fcc*`) The following are *not* included: - 64-bit integer support on SPARC-V8+'s global or out registers (`g[0-7]`, `o[0-7]`): GCC's `h` constraint (it seems that there is no corresponding constraint in LLVM?) - Floating-point registers (LLVM/GCC constraint `e`/`f`): I initially tried to implement this, but postponed it for now because there seemed to be several parts in LLVM that behaved differently than in the LangRef's description. - clobber_abi: Support for floating-point registers is needed. Refs: - LLVM - Reserved registers https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp#L52 - Register definitions https://github.com/llvm/llvm-project/blob/llvmorg-19.1.0/llvm/lib/Target/Sparc/SparcRegisterInfo.td - Supported constraints https://llvm.org/docs/LangRef.html#supported-constraint-code-list - GCC - Reserved registers https://github.com/gcc-mirror/gcc/blob/63b6967b06b5387821c4e5f2c113da6aaeeae2b7/gcc/config/sparc/sparc.h#L633-L658 - Supported constraints https://gcc.gnu.org/onlinedocs/gcc/Machine-Constraints.html - SPARC ISA/ABI - (64-bit ISA) The SPARC Architecture Manual, Version 9 (32-bit ISA) The SPARC Architecture Manual, Version 8 (64-bit ABI) System V Application Binary Interface SPARC Version 9 Processor Supplement, Rev 1.35 (32-bit ABI) System V Application Binary Interface SPARC Processor Supplement, Third Edition The above docs can be downloaded from https://sparc.org/technical-documents - (32-bit V8+ ABI) The V8+ Technical Specification https://temlib.org/pub/SparcStation/Standards/V8plus.pdf cc `@thejpster` (sparc-unknown-none-elf target maintainer) (AFAIK, other sparc/sprac64 targets don't have target maintainers) r? `@Amanieu` `@rustbot` label +O-SPARC +A-inline-assembly
2024-11-07fix testEsteban Küber-6/+1
2024-11-07Only show "same type from differnt version" note when relevantEsteban Küber-7/+15
2024-11-07Remove less relevant info from diagnosticEsteban Küber-26/+38
``` error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied because the trait comes from a different crate version --> multiple-dep-versions.rs:7:18 | 7 | do_something(Type); | ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type` | note: there are multiple different versions of crate `dependency` in the dependency graph --> /home/gh-estebank/rust/build/x86_64-unknown-linux-gnu/test/run-make/crate-loading/rmake_out/multiple-dep-versions-1.rs:4:1 | 3 | pub struct Type(pub i32); | --------------- this type implements the required trait 4 | pub trait Trait { | ^^^^^^^^^^^^^^^ this is the required trait | ::: multiple-dep-versions.rs:1:1 | 1 | extern crate dep_2_reexport; | ---------------------------- one version of crate `dependency` is used here, as a dependency of crate `foo` 2 | extern crate dependency; | ------------------------ one version of crate `dependency` is used here, as a direct dependency of the current crate | ::: /home/gh-estebank/rust/build/x86_64-unknown-linux-gnu/test/run-make/crate-loading/rmake_out/multiple-dep-versions-2.rs:3:1 | 3 | pub struct Type; | --------------- this type doesn't implement the required trait 4 | pub trait Trait { | --------------- this is the found trait = note: two types coming from two different versions of the same crate are different types even if they look the same = help: you can use `cargo tree` to explore your dependency tree ``` The approach to accomplish this is a HACK, and we'd want a better way to do this. I believe that moving E0277 to be a structured diagnostic would help in that regard.
2024-11-07Tweak diagnostic outputEsteban Küber-58/+48
``` error[E0277]: the trait bound `dep_2_reexport::Type: Trait` is not satisfied because the trait comes from a different crate version --> multiple-dep-versions.rs:7:18 | 7 | do_something(Type); | ^^^^ the trait `Trait` is not implemented for `dep_2_reexport::Type` | note: there are multiple different versions of crate `dependency` in the dependency graph --> /home/gh-estebank/rust/build/x86_64-unknown-linux-gnu/test/run-make/crate-loading/rmake_out/multiple-dep-versions-1.rs:4:1 | 3 | pub struct Type(pub i32); | --------------- this type implements the required trait 4 | pub trait Trait { | ^^^^^^^^^^^^^^^ this is the required trait | ::: multiple-dep-versions.rs:1:1 | 1 | extern crate dep_2_reexport; | ---------------------------- one version of crate `dependency` is used here, as a dependency of crate `foo` 2 | extern crate dependency; | ------------------------ one version of crate `dependency` is used here, as a direct dependency of the current crate | ::: /home/gh-estebank/rust/build/x86_64-unknown-linux-gnu/test/run-make/crate-loading/rmake_out/multiple-dep-versions-2.rs:3:1 | 3 | pub struct Type; | --------------- this type doesn't implement the required trait 4 | pub trait Trait { | --------------- this is the found trait = note: two types coming from two different versions of the same crate are different types even if they look the same = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `do_something` --> /home/gh-estebank/rust/build/x86_64-unknown-linux-gnu/test/run-make/crate-loading/rmake_out/multiple-dep-versions-1.rs:12:24 | 12 | pub fn do_something<X: Trait>(_: X) {} | ^^^^^ required by this bound in `do_something` ```
2024-11-07Tweak detection of multiple crate versions to be more ecompassingEsteban Küber-44/+74
Previously, we only emitted the additional context if the type was in the same crate as the trait that appeared multiple times in the dependency tree. Now, we look at all traits looking for two with the same name in different crates with the same crate number, and we are more flexible looking for the types involved. This will work even if the type that implements the wrong trait version is from a different crate entirely. ``` error[E0277]: the trait bound `CustomErrorHandler: ErrorHandler` is not satisfied --> src/main.rs:5:17 | 5 | cnb_runtime(CustomErrorHandler {}); | ----------- ^^^^^^^^^^^^^^^^^^^^^ the trait `ErrorHandler` is not implemented for `CustomErrorHandler` | | | required by a bound introduced by this call | help: you have multiple different versions of crate `c` in your dependency graph --> src/main.rs:1:5 | 1 | use b::CustomErrorHandler; | ^ one version of crate `c` is used here, as a dependency of crate `b` 2 | use c::cnb_runtime; | ^ one version of crate `c` is used here, as a direct dependency of the current crate note: two types coming from two different versions of the same crate are different types even if they look the same --> /home/gh-estebank/testcase-rustc-crate-version-mismatch/c-v0.2/src/lib.rs:1:1 | 1 | pub trait ErrorHandler {} | ^^^^^^^^^^^^^^^^^^^^^^ this is the required trait | ::: /home/gh-estebank/testcase-rustc-crate-version-mismatch/b/src/lib.rs:1:1 | 1 | pub struct CustomErrorHandler {} | ----------------------------- this type doesn't implement the required trait | ::: /home/gh-estebank/testcase-rustc-crate-version-mismatch/c-v0.1/src/lib.rs:1:1 | 1 | pub trait ErrorHandler {} | ---------------------- this is the found trait = help: you can use `cargo tree` to explore your dependency tree note: required by a bound in `cnb_runtime` --> /home/gh-estebank/testcase-rustc-crate-version-mismatch/c-v0.2/src/lib.rs:3:41 | 3 | pub fn cnb_runtime(_error_handler: impl ErrorHandler) {} | ^^^^^^^^^^^^ required by this bound in `cnb_runtime` ``` Fix #89143.
2024-11-07remove the extra specification for llvm versions < 20Hans Wennborg-0/+5
2024-11-07Merge pull request #13657 from jdonszelmann/disallowed-macros-to-earlyPhilipp Krones-38/+98
collect attribute spans early for disallowed macros
2024-11-07Update mips64 data layout to match LLVM 20 changeHans Wennborg-7/+7
LLVM changed the data layout in https://github.com/llvm/llvm-project/pull/112084
2024-11-07Update test for LLVM 20's new vector splat syntaxHans Wennborg-3/+3
that was introduced in https://github.com/llvm/llvm-project/pull/112548
2024-11-07Auto merge of #132736 - matthiaskrgr:rollup-66naqwb, r=matthiaskrgrbors-61/+72
Rollup of 4 pull requests Successful merges: - #132638 (Remove fixme comment about clobber_abi on PowerPC) - #132726 (Remove unused intercrate dependencies) - #132729 (Make fn_abi_sanity_check a bit stricter) - #132734 ( remove 'platform-intrinsic' ABI leftovers) r? `@ghost` `@rustbot` modify labels: rollup
2024-11-07Initialize channel `Block`s directly on the heapJosh Stone-4/+32
The channel's `Block::new` was causing a stack overflow because it held 32 item slots, instantiated on the stack before moving to `Box::new`. The 32x multiplier made modestly-large item sizes untenable. That block is now initialized directly on the heap. Fixes #102246
2024-11-07Merge pull request #13639 from flip1995/rustupPhilipp Krones-506/+530
Rustup
2024-11-07Remove CI badge from README and bookPhilipp Krones-2/+0
2024-11-07Merge pull request #13587 from Kobzol/ci-remove-borsPhilipp Krones-129/+75
Switch CI from bors to merge queue
2024-11-07Remove path filterJakub Beránek-14/+0
It would cause issues with the required jobs, and it is probably useless anyway, the vast majority of PRs seem to change Rust source files.
2024-11-07Add conclusion job to PR CIJakub Beránek-0/+21
2024-11-07bootstrap: Print better message if lock pid isn't availableclubby789-2/+6
2024-11-07Rollup merge of #132734 - RalfJung:platform-intrinsic, r=compiler-errorsMatthias Krüger-5/+4
remove 'platform-intrinsic' ABI leftovers This was removed a while ago, but some parts haven't been fully cleaned up.